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])

imageWriteBase64 Argument Reference

name
Required

The image on which this operation is performed.

destination
Required

The path for the destination file.

format
Required

the image format

inHTMLFormat
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
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