House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Search cf-talk

January 08, 2009

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
         1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Home / Groups / ColdFusion Talk (CF-Talk)

ColdFusion 8 image resize makes picture too small??

Author:
Adrian Lynch
11/07/2008 06:27 AM

It should get you 160x107 for the 968x648 image though. I wonder if it's a bug or if there's a valid reason for it? Adrian With a picture that 600x400 I get width = 160 px (as I asked) and a height of 106px. So it seems it could be rounding-related.... >Yup, I've seen it but it's never been an issue because it's only 1px out. > >I get that maintaining the aspect ratio will result in decimal values but >even when it's 159 it still gives it a decimal width. > >968x648 >160x107.107 >159x106.438 > >What width are you getting, 107 or 106? > >I'm interested in this too. > >Adrian >Building a database of ColdFusion errors at http://cferror.org/ > >I have a jpg, width = 968px, height = 648px. > >I run the following command; ><cfimage action="resize" source="#mySource#" width="160" height="" >name="oImage"> > >and immediately after that; > ><cfset this.nImageWidth = ImageGetWidth(oImage)> ><cfset this.nImageHeight = ImageGetHeight(oImage)> > >To my shock and horror, the width returned is 159 instead of the asked >160!?! > >Has anyone else experienced this and is there a work-around?


Mailing Lists