Difference between revisions of "Cfx imagecr3"
From Hostek.com Wiki
(CFX_imagecr3 CFX Tags) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
− | + | <h2>To rename an image file</h2> | |
− | <h2>To rename an image file | + | |
<syntaxhighlight lang="cfm"> | <syntaxhighlight lang="cfm"> | ||
Line 10: | Line 9: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | <h2>To resize an image file and display the new image | + | <h2>To resize an image file and display the new image</h2> |
<syntaxhighlight lang="cfm"> | <syntaxhighlight lang="cfm"> | ||
Line 21: | Line 20: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | <h2>To crop an image file and display the new image | + | <h2>To crop an image file and display the new image</h2> |
<syntaxhighlight lang="cfm"> | <syntaxhighlight lang="cfm"> | ||
Line 33: | Line 32: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | <h2>To gather and display information about the image file | + | <h2>To gather and display information about the image file</h2> |
<syntaxhighlight lang="cfm"> | <syntaxhighlight lang="cfm"> |
Latest revision as of 21:18, 2 August 2013
We offer the CFX tag CFX_imagecr3 on our CF servers, which provides quite a few options for image manipulation. The following are a few examples on using imagecr3.
Contents
To rename an image file
<cfx_imagecr3 load="#expandpath('example.jpg')#" save="#expandpath('example-resaved.jpg')#">
To resize an image file and display the new image
<cfx_imagecr3 load="#expandpath('example.jpg')#" save="#expandpath('example-resized.jpg')#" resize="200x200"> <cfoutput> <img src="example-resized.jpg"> </cfoutput>
To crop an image file and display the new image
<cfx_imagecr3 load="#expandpath('example.jpg')#" save="#expandpath('example-cropped.jpg')#" crop="200x200" anchor="center"> <cfoutput> <img src="example-cropped.jpg"> </cfoutput>
To gather and display information about the image file
<cfx_imagecr3 getimageinfo="#expandpath('example.jpg')#" > <cfoutput> <pre> Width = #imagecr.width# Height = #imagecr.height# DPI = #imagecr.dpi# FileSize = #imagecr.filesize# </pre> </cfoutput>