22.08.2013 Views

ColdFusion Developer's Guide

ColdFusion Developer's Guide

ColdFusion Developer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Beta Beta Beta Beta Beta Beta Beta<br />

SELECT EMLPOYEEID, PHOTO FROM Employees<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

For information on converting a <strong>ColdFusion</strong> image to a BLOB, see “Inserting an image as a<br />

BLOB in a database” on page 1093.<br />

Creating an image from a Base64 string<br />

Base64 is a way to describe binary data as a string of ASCII characters. Some databases store<br />

images in Base64 format rather than as BLOB data. You can use the cfimage tag or the<br />

ImageReadBase64 function to read Base64 data directly from a database. This eliminates the<br />

intermediary steps of binary encoding and decoding.<br />

The following examples show how to use the cfimage tag to create a <strong>ColdFusion</strong> image from<br />

a Base64 string:<br />

<br />

<br />

<br />

<br />

The following examples show how to use the ImageReadBase64 function to create a<br />

<strong>ColdFusion</strong> image from a Base64 string:<br />

<br />

<br />

<br />

<br />

For more information on Base64 strings, see “Converting an image to a Base64 string”<br />

on page 1093.<br />

1090 Creating and Manipulating <strong>ColdFusion</strong> Images

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!