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 string
Required

The image on which this operation is performed.

destination string
Required

The path for the destination file.

format string
Required

the image format

inHTMLFormat boolean
Default: false

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

overwrite boolean
Default: true

If set to true, overwrites the destination file.
Values:
  • false
  • true

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