Functions
encode
encode(data, url?, raw?) -> string
- data
string
- url
bool
- If true, use URL encoding. - raw
bool
- If true, use raw encoding.
string
- The base64 encoded data.
decode
decode(data, url?, raw?) -> string
- data
string
- url
bool
- If true, use URL encoding. - raw
bool
- If true, use raw encoding.
string
- The base64 decoded data.
encode_image
encode_image(id, raw?) -> string
@blocking
- id
int<collection.IMAGE>
- The image to encode. - raw
bool
- If true, use raw encoding.
string
- The base64 encoded data.
encode_image_to_file
encode_image_to_file(id, path, raw?)
- id
int<collection.IMAGE>
- The image to encode. - path
string
- The path to save the image. - raw
bool
- If true, use raw encoding.
decode_image
decode_image(data, name, encoding, model?, raw?) -> int<collection.IMAGE>
- data
string
- The base64 encoded image data. - name
string
- The name of the image. - encoding
int<image.ENCODING>
- The image encoding must match the encoding of the data. - model
int<image.MODEL>
- Used only to specify default when there is an unsupported color model. - raw
bool
- If true, use raw encoding.
int<collection.IMAGE>
- The decoded image.
decode_image_from_file
decode_image_from_file(path, name, encoding, model?, raw?) -> int<collection.IMAGE>
- path
string
- The path to the base64 encoded image data. - name
string
- The name of the image. - encoding
int<image.ENCODING>
- The image encoding must match the encoding of the data. - model
int<image.MODEL>
- Used only to specify default when there is an unsupported color model. - raw
bool
- If true, use raw encoding.
int<collection.IMAGE>
- The decoded image.