Sharing Ideas And Solutions Our Newsletter Downloadable Solutions PHP Classes For Small & Medium Enterprise Free For Non-Profit Organization Customer Feedback Contact Us Featured Web Template View More Templates MasRizal In Numbers * 25 years in business. * 6856 corporations in 67 countries have chosen our products and service. * 73.20% are using more than one solutions from us. - MasRizal & Partners -Enhancing Business With Trust Resize Image Custom Tag: cf_image_resizeVersion: 3.0(c) 2007, MasRizal & Partners rizal.firmansyah@masrizal.comcf_image_resize is a quick solution to resize image on-the-fly. Using built-in Java provided by CFMX, this custom tag requires no CFX installation. Just put the custom tag on the working directory, and you're on! New in V2:Better support for GIF and PNG files which have alpha layer (transparent).Better error handling. CF_Image_Resize will now throws an error whenever incorrect parameter was supplied.The caller page can trap the error message in <cftry><cfcatch> block. New in V3:Support for ColdFusion 8 Features Requirements Usage Application Example
Resize on-the-fly, you can retain the original image unchanged.
[h1] Fast operation Input image file supported: GIF, JPG, PNG Output image file supported: JPG, PNG High quality image output can be achieved by controlling JPEG compression level You can limit the maximum width or height for resizing, and the custom tag will resize proportionally Ability to resize only if the original image is larger than specified New in V2:Better support for GIF and PNG files which have alpha layer (transparent).[/h1][h1]Better error handling.[/h1][h1] CF_Image_Resize will now throws an error whenever incorrect parameter was supplied.[/h1][h1] New in V3:Support ColdFusion 8.[/h1][h1] Works using CFMX built-in Java.[/h1][h1] No 3rd party application needed.[/h1][h1] No CFX tags.[/h1][h1] Shared hosting friendly.[/h1][h1]Just copy this custom tag in your ColdFusion working directory, and you're set [/h1]Supported ColdFusion Server: ColdFusion MX 6, 6.1 ColdFusion 7 ColdFusion 8 on all operating systems Supported browsers:Since this tag is working on server side, all browsers are compatible. <cf_image_resize InputImageFile="Full path and filename for the image to be resized (mandatory). Accepted format: jpg, png, gif" OutputImageFile="Full path and filename for resulting image (mandatory). Allowable format: jpg, png" ToWidth="Exact width of the resulting image. 0 means proportional resize based on ToHeight" ToHeight="Exact height of the resulting image. 0 means proportional resize based on ToWidth" MaxWidth="Maximum width of the resulting image. 0 means proportional resize based on MaxHeight" MaxHeight="Maximum height of the resulting image. 0 means proportional resize based on MaxWidth" Quality="JPEG compression quality (0-100) 0 is the worst quality while 100 has the best quality" IfInputLargerOnly="Set the resizing engine to resize only if InputImageFile is larger than MaxWidth and MaxHeight (1/0)"> Explanation:1. ToWidth and ToHeight determine the exact size of resulting image. You can specify these values as pixels or as percentage. For example: Towidth="100" or Towidth="50%" To resize proportionally you can set these values to the same percentage value. 2. MaxWidth and MaxHeight determine the maximum size of resulting image, in pixels. You will these attributes if you want the resulting image to have a specific maximum width or height. For example: If you put towidth="50%" and toheight="50%" and the original image size is 1000x1000 pixels, the resulting image will be 500x500 pixels. But if you want the max image to be 100x200, then you can set MaxWidth="100 and MaxHeight="200", and the resulting image will be resized proportionally based on those maximum values. 3. IfInputLargerOnly Set this value to "yes" or "true" or "1" and specify MaxWidth and MaxHeight if you want to resize the original image only if the original image is larger than MaxWidth and MaxHeight. If the original image is smaller than MaxWidth and MaxHeight, the resulting image will be the same like the input image. 4. New on v1.1Another way to set proportional resize is to put 0 either in ToWidth/ToHeight or MaxWidth/MaxHeight.Eg: ToWidth=0 ToHeight=100 will set the resulting image to 100px tall, and the wide will be resized proportionally.Eg: MaxWidth=300 ToHeight=0 will set the resulting image to maximum 300px wide, and the height will be resized proportionally.You will need this tag mostly if your website uses image heavily. Using this tag, you can be sure all your images are being equally in size. So your web design will looks best.Some applications that may benefit by using this tag are: Image directories, slideshows. Photography website e-Commerce application Application where image is being uploaded by your visitor, such as a trading website, a real-estate website, etc.You need to resize their uploaded images, so all images have the same size and won't effect your web layout And many more... For a complete example please click this link (Open in new window) (Tabbed page powered by CF_Tab) Price License Purchase $49.99 1 Single developer $499.90 1 Site license $749.85 1 Corporate license Licensing Information Goods and services provided by MasRizal Sold by 2CheckOut.com Inc. (Ohio, USA). 2Checkout & MasRizal accepts customer orders via online checks, Visa, MasterCard, Discover, American Express, Dinners, JCB and debit cards with the Visa and MasterCard logo. PayPal and purchasing using your existing bank account are limited to US currency. Resize Image is available for immediate download. After you complete the order, you will receive a confirmation email with your download link. Please ensure your email address is entered correctly during the order process. Customers Who Purchased Resize Image Usually Purchased These Products Too 1. Rotate Image 2. Watermark Image 3. Related Select 4. CF_Email_Validator 5. XPToolbar - Un-encrypted version 6. CF_Unzip 7. CF_FlashMultiUpload 8. CFX_Excel 9. CSV2Query 10. CF_IP2Country Why Customers Choose Us Find out why our valued customers choose MasRizal & Partners solutions. Click here to see their reasons Featured Customers More than 6850 companies rely on MasRizal & Partners solutions. Click here to see our featured customers Free For Non-Profit Organization MasRizal Charity program allows eligible nonprofit organizations to get MasRizal's products at no cost. Click here for program detail Testimonials Take the word of our clients Top Selling Products See our top selling products Let Us Help You Can't find solution you need? Click here to get solution from MasRizal.
cf_image_resize is a quick solution to resize image on-the-fly. Using built-in Java provided by CFMX, this custom tag requires no CFX installation. Just put the custom tag on the working directory, and you're on!
New in V2: Better support for GIF and PNG files which have alpha layer (transparent). Better error handling. CF_Image_Resize will now throws an error whenever incorrect parameter was supplied. The caller page can trap the error message in <cftry><cfcatch> block.
Resize on-the-fly, you can retain the original image unchanged.
Fast operation
Input image file supported: GIF, JPG, PNG
Output image file supported: JPG, PNG
High quality image output can be achieved by controlling JPEG compression level
You can limit the maximum width or height for resizing, and the custom tag will resize proportionally
Ability to resize only if the original image is larger than specified
New in V2: Better support for GIF and PNG files which have alpha layer (transparent). Better error handling. CF_Image_Resize will now throws an error whenever incorrect parameter was supplied.
New in V3: Support ColdFusion 8.
Works using CFMX built-in Java. No 3rd party application needed. No CFX tags. Shared hosting friendly. Just copy this custom tag in your ColdFusion working directory, and you're set
Supported ColdFusion Server:
ColdFusion MX 6, 6.1
ColdFusion 7
ColdFusion 8
on all operating systems
Supported browsers: Since this tag is working on server side, all browsers are compatible.
<cf_image_resize
InputImageFile="Full path and filename for the image to be resized (mandatory). Accepted format: jpg, png, gif"
OutputImageFile="Full path and filename for resulting image (mandatory). Allowable format: jpg, png"
ToWidth="Exact width of the resulting image. 0 means proportional resize based on ToHeight"
ToHeight="Exact height of the resulting image. 0 means proportional resize based on ToWidth"
MaxWidth="Maximum width of the resulting image. 0 means proportional resize based on MaxHeight"
MaxHeight="Maximum height of the resulting image. 0 means proportional resize based on MaxWidth"
Quality="JPEG compression quality (0-100) 0 is the worst quality while 100 has the best quality"
IfInputLargerOnly="Set the resizing engine to resize only if InputImageFile is larger than MaxWidth and MaxHeight (1/0)">
Explanation: 1. ToWidth and ToHeight determine the exact size of resulting image. You can specify these values as pixels or as percentage. For example: Towidth="100" or Towidth="50%" To resize proportionally you can set these values to the same percentage value.
2. MaxWidth and MaxHeight determine the maximum size of resulting image, in pixels. You will these attributes if you want the resulting image to have a specific maximum width or height. For example: If you put towidth="50%" and toheight="50%" and the original image size is 1000x1000 pixels, the resulting image will be 500x500 pixels. But if you want the max image to be 100x200, then you can set MaxWidth="100 and MaxHeight="200", and the resulting image will be resized proportionally based on those maximum values.
3. IfInputLargerOnly Set this value to "yes" or "true" or "1" and specify MaxWidth and MaxHeight if you want to resize the original image only if the original image is larger than MaxWidth and MaxHeight. If the original image is smaller than MaxWidth and MaxHeight, the resulting image will be the same like the input image.
4. New on v1.1 Another way to set proportional resize is to put 0 either in ToWidth/ToHeight or MaxWidth/MaxHeight. Eg: ToWidth=0 ToHeight=100 will set the resulting image to 100px tall, and the wide will be resized proportionally. Eg: MaxWidth=300 ToHeight=0 will set the resulting image to maximum 300px wide, and the height will be resized proportionally.
You will need this tag mostly if your website uses image heavily. Using this tag, you can be sure all your images are being equally in size. So your web design will looks best. Some applications that may benefit by using this tag are:
Image directories, slideshows.
Photography website
e-Commerce application
Application where image is being uploaded by your visitor, such as a trading website, a real-estate website, etc. You need to resize their uploaded images, so all images have the same size and won't effect your web layout
Goods and services provided by MasRizal
Sold by 2CheckOut.com Inc. (Ohio, USA).
2Checkout & MasRizal accepts customer orders via online checks, Visa, MasterCard, Discover, American Express, Dinners, JCB and debit cards with the Visa and MasterCard logo.
PayPal and purchasing using your existing bank account are limited to US currency.
Resize Image is available for immediate download.
After you complete the order, you will receive a confirmation email with your download link.
Please ensure your email address is entered correctly during the order process.
Customers Who Purchased Resize Image Usually Purchased These Products Too
Free For Non-Profit Organization
MasRizal Charity program allows eligible nonprofit organizations to get MasRizal's products at no cost. Click here for program detail