ImageReadBase64()

Creates an image from a Base64 string.

Requires Extension: Image extension

ImageReadBase64( b64str=string );

Returns: any

Argument Description
b64str
string, required

a variable or Base64 string.

Alias: data

Examples

imgObj = imageReadBase64('data:image/jpg;base64,/9j/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ
	EBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBA
	QEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAAUCAAUABQEASIAAhEBAxEBBCIA/8QAHwAAAQUBAQEBAQE
	AAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0
	fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJ
	WWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwE
	BAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKR
	obHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhY
	aHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9o
	ADgQBAAIRAxEEAAA/APxfooor/Kc/7+D+/iiiiiiiigAooooooooAKKKKKKKKACiiiv/Z');
<span class="nf">cfimage</span><span class="p">(</span><span class="nv">action</span><span class="o">=</span><span class="s2">&quot;writeToBrowser&quot;</span><span class="p">,</span> <span class="nv">source</span><span class="o">=</span><span class="nv">imgObj</span><span class="p">);</span>

See also