This content has been marked as final. Show 2 replies
If you are trying to return the image dimensions, there is always
imageGetHeight() and imageGetWidth() functions, or, using the cfimage tag
with an attribute of action="info" you can return a struct with heaps of
info, including the dimensions. From the live docs:
<!--- This example shows how to retrieve and display image information. --->
<cfimage source="../cfdocs/images/artgallery/viata03.jpg" action="info"
<!--- Alternatively, you can use the cfoutput tag to display specific image
shown in the following example. --->
<p>height: #viatoInfo.height# pixels</p>
<p>width: #viatoInfo.width# pixels</p>
<p>pixel size: #viatoInfo.colormodel.pixel_size#</p>
<p>color model: #viatoInfo.colormodel.colormodel_type#</p>
<p>alpha channel support:
<p>color space: #viatoInfo.colormodel.colorspace#</p>
"cfcolorado" <firstname.lastname@example.org> wrote in message
> Is it possible with cfimage to get the height and wdith of an image to set
> to a
> var? I can use CFX_ImageInfo but I was hoping to use cfimage to handle
> everything. It seems that the height and width attributes are used for
> the attributes and not displaying what they are.
Perfect, thanks Lossed!