imageWriteBase64

Writes Base64 images to the specified filename and destination.

imageWriteBase64(name, destination, format [, inHTMLFormat] [, overwrite]) → returns void

Member Function Syntax

someImage.writeBase64(destination, format [, inHTMLFormat] [, overwrite])

Argument Reference for the imageWriteBase64 function

name

Required: Yes
The image on which this operation is performed.

destination

Required: Yes
The path for the destination file.

format

Required: Yes
the image format

inHTMLFormat

Required: No
Default: NO
Specify whether Base64 output includes the headers used by the Base64 images in the HTML 'img' tag ('data:image/{format};base64,...') Values:
  • NO
  • YES

overwrite

Required: No
Default: YES
If set to true, overwrites the destination file. Values:
  • NO
  • YES

Examples sample code invoking the imageWriteBase64 function


Using translateDrawingAxis member function

CF 11+ Write a base64 representation of an image

imgObj = imageNew("",152,152,"rgb","149c82");
imgObj.writeBase64('base64.txt','jpg');

Fork me on GitHub