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 -----Original Message----- From: Michael Christensen Sent: 07 November 2008 11:14 To: cf-talk Subject: Re: CF8 image resize makes picture too small?? 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? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314934 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4