The following properties can be set in CF_IMG or CF_IMGSIZE
as they are all part of the CF_IMGSIZE tag although for better
functionality with images it is best to use the tags together.
For more information check the details at cfdev.iamserious.com.au
MAXWIDTH=value MAXHEIGHT=value
The MAXWIDTH and MAXHEIGHT attributes tell the tag the maximum allowable space for an image.
If the author specifies these, the tag will draw out the width and height of the
image and set width and height attributes to proportionally reduce the size of the image to acceptable levels.
Both attributes are optional and can either be used alone together or not at all.
OUTPUT="a name to define returning variables"
The OUTPUT attribute tells the tag the required name or returning variables.
<CF_IMG SRC="triangle.gif" OUTPUT="serious">
Will return the following variables:
(The original file dimensions)
serious_ImgFileWidth
serious_ImgFileHeight
(The recalculated file dimensions)
serious_ImgWidth
serious_ImgHeight
serious_ImgType
serious_ImgKBytes
serious_ImgResized
<CF_IMG SRC="triangle.gif">
Will return the following variables:
(The original file dimensions)
ImgFileWidth
ImgFileHeight
(The recalculated file dimensions)
ImgWidth
ImgHeight
ImgType
ImgKBytes
ImgResized
CWS ERROR
The CWS error thrown can be caught using cfcatch to return that the file type is SWC instead of SWF.
SWC is the Flash MX compressed standard that is not possible to decompress easily.
The error thrown is as follows:
<cfthrow type="CWS" message="Cannot read compressed SWF format.">
OUTPUT="a name to define returning variables"
The OUTPUT attribute tells the tag the required name or returning variables.
<CF_IMG SRC="triangle.gif" OUTPUT="serious">
Will return the following variables:
serious_ImgFileWidth (The original file dimensions)
serious_ImgFileHeight (The original file dimensions)
serious_ImgWidth
serious_ImgHeight
serious_ImgType
serious_ImgKBytes
serious_ImgResized (Returns 1 or 0, 1 being that the output dimension has been resized)
<CF_IMG SRC="triangle.gif">
Will return the following variables:
ImgFileWidth (The original file dimensions)
ImgFileHeight (The original file dimensions)
ImgWidth
ImgHeight
ImgType
ImgKBytes
ImgResized (Returns 1 or 0, 1 being that the output dimension has been resized)
1.7(21-Aug-2003)
Fixed
- Fixed code that caused errors after upgrading from Coldfusion 6 to 6.1
A bug report has been submitted to Macromedia so hopefully by the time most people upgrade it should be ok, however till then the latest version bypasses a nested switch using cfif statements instead, not as clean but will work until the next round of upgrade bugs appear.
1.6(17-Oct-2002)
Added
- Original file proportions available through ImgFileWidth and ImgFileHeight properties
- Test to see if proportions are altered with the ImgResized value
Fixed
- JFIF JPEG fault with small files not finding correct width and height because they were giving up too soon, calculated file size based on a KB size of 1000 not 1024
1.5(01-Aug-2002)
Added
- TIFF support based on Adobe specification for version 6 (finally! sorry it took so long)
- SWF support updated, Flash MX files that are compressed throw error of type "CWS".
- cfm-resources.com support
- noprops attribute for added slideshow functionality by removing width and height attributes.
1.4(12-Feb-2002)
Added
- SWF support
1.3(27-Jan-2002) Don't remember, never kept a copy.
1.2(01-Sep-2001)
Added
- Pathtype attribute to allow for Absolute paths
Fixed
- The tag now uses the correct jpeg hex byte level marker standards so ALL known jpeg file formats should function correctly.
Added
- support for GIF, BMP, JPG and PNG
© 2001,2002,2003 last update: 21-Aug-2003, Marcel @ Serious Multimedia