Love the cfc: why is resize quality is very poor
Posted Friday, December 1, 2006 at {ts '2013-05-24 16:31:00'}

Hello,

First le me say that I love this cfc. Ii was wondering if there was anything I could do to improve the quality of the resized image?

See the attached zip file.

Contains orginal and resized image.

I've also attached my cold fusion codl that I use in case this may help someone else out using this cfc.

<!--- CREATE COMPONENT OBJECT --->
<cfset imagecfc = createObject("component","image")>

<!--- SET PATHS TO STORE IMAGES --->
<!--- RESIZE IMAGE PATH --->
<CFSET image_path = "D:\Inetpub\wwwroot\Yobaby\images\babies_of_the_week\gallery\babyimages\large\">
<!--- ORIGINAL IMAGE PATH --->
<CFSET move_image_path = "D:\Inetpub\wwwroot\Yobaby\images\babies_of_the_week\gallery\babyimages\orginal\">
<!--- CHANGE THE X VALUE --->
<cfset results2 = imageCFC.scaleX("", "#image_path#/#FORM.first_name#_#FORM.last_name#_#FORM.babys_name#.jpg", "#image_path#/#FORM.first_name#_#FORM.last_name#_#FORM.babys_name#_s.jpg", 100)>

<!--- MOVE THE ORIGINAL IMAGE TO THE SAFE --->
<!--- move original to safe folder --->
<cffile    
   action = "move"   
   source = "#image_path##FORM.first_name#_#FORM.last_name#_#FORM.babys_name#.jpg"   
   destination = "#move_image_path##FORM.first_name#_#FORM.last_name#_#FORM.babys_name#.jpg"    
   >
<!--- CHANGE THE Y VALUE --->
<cfset results3 = imageCFC.scaleY("", "#image_path#/#FORM.first_name#_#FORM.last_name#_#FORM.babys_name#_s.jpg", "#image_path#/#FORM.first_name#_#FORM.last_name#_#FORM.babys_name#_f.jpg", 100)>

<!--- delete first resized image --->
<cffile    
   action = "delete"   
   file = "#image_path##FORM.first_name#_#FORM.last_name#_#FORM.babys_name#_s.jpg">