CFX_ImageInfo Folder Sample Script

<!--- This is for processing an entire folder. Change it according to your site settings --->

&ltCFX_ImageInfo FOLDER="d:\inetpub\yoursite\images\">


<!--- for individual files, use this:

&ltCFX_ImageInfo FILE="yourfile.jpg">

--->


&ltCFOUTPUT>
&ltpre>
Folder &ltb>#ImageInfoFolder#</b>
Error &ltb>#ImageInfoError#</b>
</pre>
</cfoutput>


&ltCFIF IsDefined("ImageInfo")>
&ltCFIF IsQuery(ImageInfo)>

&lttable border=1 class=compact>
&lttr>
&ltth&gtFile</th>
&ltth&gtError</th>
&ltth&gtType</th>
&ltth&gtWidth</th>
&ltth&gtHeight</th>
&ltth&gtPixels</th>
&ltth&gtSize</th>
&ltth&gtPixelBits</th>
&ltth&gtColors</th>
&ltth&gtColorType</th>
&ltth&gtCompression</th>
&ltth&gtDPI</th>
&ltth&gtComments</th>
</tr>

&ltCFLOOP QUERY="ImageInfo">
&ltCFOUTPUT>
&lttr>
&lttd>&ltb>#File#</b></td>
&lttd>&ltb>#Error#</b></td>
&lttd>&ltb>#Type#</b></td>
&lttd>&ltb>#Width#</b></td>
&lttd>&ltb>#Height#</b></td>
&lttd>&ltb>#Pixels#</b></td>
&lttd>&ltb>#Size#</b></td>
&lttd>&ltb>#PixelBits#</b></td>
&lttd>&ltb>#Colors#</b></td>
&lttd>&ltb>#ColorType#</b></td>
&lttd>&ltb>#Compression#</b></td>
&lttd>&ltb>#DPI#</b></td>
&lttd>&ltsmall>&ltb>#Comments#</b></small></td>
</tr>
</CFOUTPUT>
</CFLOOP>
</table>

&ltCFOUTPUT>#ImageInfo.RecordCount#</CFOUTPUT> records&ltbr>
&ltCFELSE>
&ltp&gtIsQuery fails...</p>
</CFIF>

&ltCFELSE>
&ltp&gtIsDefined fails...</p>
</CFIF>

Add Feedback