Return Values

Return values are variables set in Coldfusion when the tag is called. The values returned depend on the mode the tag is operating in. The most commonly used return value is by far imagecr.filename. Most implementations do not use anything else and some will use none at all, choosing instead their own convention for naming images.

The default load & save mode returns the following (see also: returnextras):

In the default load & save mode the following also applies:

The getcomment attribute returns imagecr.comment
The getexif attribute returns imagecr_exif
The getiptc attribute returns imagecr_iptc
The savedata attribute returns imagecr.data

getimageinfo mode returns:

getimagedetails mode returns everything returned by getimageinfo, getcomment, getexif, and getiptc:

getdefaultsave mode returns imagecr.defaultsave.

getversion mode returns imagecr.version.

 Name Example values
IMAGECR.WIDTH
400
127
0
etc..
 
Width of image.
 

IMAGECR.HEIGHT
300
219
0
etc..
 
Height of image.
 

IMAGECR.FILENAME
image.jpg
ca62f828bb4f89b4b1de0e62ec40db4f.jpg
etc..
 
Filename of image. Not a path.
v3.5.0: added to getimageinfo/getimagedetails returns
 

IMAGECR.DIRECTORY
C:\Images\
D:\Web\Images\
etc..
 
Directory of image. Absolute.
v3.5.0: added
 

IMAGECR.FORMAT
JPEG
GIF
PNG
etc..
 
Format of image.
v3.5.0: added
 

IMAGECR.FILESIZE
12288
11712
etc..
 
Filesize of image, in bytes.
v3.1.0: added
 

IMAGECR.FILECREATED
39111.7278374537
#dateformat(imagecr.filecreated)#
etc..
 
File created timestamp, a floating point value. Suitable for passing to date and time functions.
v3.5.2: added
 

IMAGECR.FILEMODIFIED
38834.8116317593
#dateformat(imagecr.filemodified)#
etc..
 
File modified timestamp, a floating point value. Suitable for passing to date and time functions.
v3.5.2: added
 

IMAGECR.FILEACCESSED
39156.6341078819
#dateformat(imagecr.fileaccessed)#
etc..
 
File accessed timestamp, a floating point value. Suitable for passing to date and time functions.
v3.5.2: added
 

IMAGECR.DPI
72
96
300
600
etc..
 
DPI of image.
 

IMAGECR.COMMENT
A comment
etc..
 
Text comment retrieved from image.
v3.5.0: added
 

IMAGECR_EXIF
 
EXIF data. Returned as standard Coldfusion query with columns "key" and "value".
returned by: getimagedetails, getexif
v3.5.0: added
 

IMAGECR_IPTC
 
IPTC data. Returned as standard Coldfusion query with columns "key" and "value".
returned by: getimagedetails, getiptc
v3.5.0: added
 

IMAGECR.DATA
 
Image data encoded as a Base64String.
returned by: savedata
v3.5.0: added
 

IMAGECR.EXISTED
0
1
 
Returns 1 if output image filename already exists, else returns 0.
returned by: load
 

IMAGECR.CREATED
0
1
 
Returns 1 if a new image is created as a result of calling the tag; else returns 0.
returned by: load
v3.1.0: added
 

IMAGECR.CACHED
 
Deprecated in favor of IMAGECR.CREATED.
v3.5.0: officially deprecated
 

IMAGECR.LOADFAILED
0
1
 
Returns 1 if the image failed to load.
 

IMAGECR.SAVEFAILED
0
1
 
Returns 1 if the image failed to save.
returned by: load
 

IMAGECR.VERSION
3.0.0
3.1.0
3.5.0
etc..
 
Current ImageCR version number.
returned by: getversion
 

IMAGECR.DEFAULTSAVE
D:\Web\Site\thumbnails\
D:\Site\_cache\
etc..
 
Default save value.
returned by: getdefaultsave
 

IMAGECR.ERROR
140420
etc..
 
Error ID. Non-zero indicates an error. The same id is sent in exceptions.
v3.1.0: added
 

IMAGECR.ERRORTYPE
LOADFAILED
SAVEFAILED
NULLIMAGE
UNHANDLED
UNKNOWN

 
Error classification string. The same type is sent in exceptions.
v3.1.0: added
 

IMAGECR.ERRORMESSAGE
 
Error details message. The same message is sent in exceptions.
v3.1.0: added
 

IMAGECR.RETURNVALUES
 
A comma-delimited list of return value names being returned.
v3.5.0: added
 

Advanced Notes

Do not assign to the "imagecr" variable name in Coldfusion before calling CFX_ImageCR.
In fact, it is best to simply leave "imagecr" alone and available for use by CFX_ImageCR exclusively.



« Attributes (prev) (next) How does it work? »

Copyright © Efflare Systems