Image Resize Bug
19 March 2010 22:37 (EST)
It looks like ColdFusion (version 8.0.1 at least) has a problem resizing images with certain aspect ratio. Look at the code below:
What should is display? 150px? Nope, it shows 149px. Any ideas how to fix this?
<cfset img = ImageNew("",336,448) />
<cfset ImageResize(img,150,"") />
<cfoutput>#img.width#px</cfoutput>
<cfset ImageResize(img,150,"") />
<cfoutput>#img.width#px</cfoutput>
What should is display? 150px? Nope, it shows 149px. Any ideas how to fix this?
← Error invoking CFC for gateway: null: Previous
Discussion (2 comments)