vg4->image->tobase64()
Convert image to base64.
SYNTAX
VG_BOOL
vg4->image->tobase64(const struct VG_Image *imgp,
VG_BOOL noalpha,
char **encdata,
size_t *encsize)
FUNCTION PARAMETERS
imgp | Image |
noalpha | If set to VG_TRUE, opaqueness will be discarded (set alpha to 255) |
encdata | For returning encoded data (with terminating 0), (must be freed with free()) |
encsize | For returning number of bytes in encdata (without terminating 0) |
RETURN VALUE
Returns boolean:
- VG_TRUE: OK
- VG_FALSE: Error
DESCRIPTION
Convert image to base64 (e.g. for text control-command "img")
The format of the encoded image will be PAM with RGB or RGB_ALPHA.