imageReadBase64

Creates a ColdFusion image from a Base64 string.

imageReadBase64(string) → returns Image

Argument Reference for the imageReadBase64 function

string

Required: Yes
a variable or Base64 string

Examples sample code invoking the imageReadBase64 function


Using script syntax

convert base64 representation of a small red dot to an image

imgObj = imageReadBase64('iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==');
cfimage(action="writeToBrowser", source=imgObj);

Fork me on GitHub