Hello, all,
I've got an issue that has me perplexed.
We have a section on our restricted site for news. There is an admin panel that allows someone (authorized) to create/edit news articles, and one of the optional fields is for uploading an image.
Now, so far this hasn't really presented any problems. Until today, every image that was uploaded fit a particular format ratio, so everything appears correct.
Today, two images that are much more wide compared to the height have been uploaded. When viewing the actual article, it looks okay. However, on the 'landing' page of the site, there is a carousel that rotates among four selected articles that contain an image, along with four clickable thumbnails on the right side. For both the thumbnails and the full-size image associated with it, those two images extend past the right of the image space, I'm assuming it's using overflow: hidden;.
I tried to update the page that processes the form, using imageInfo() to check height/width of all images, and use resizeImage() to bring the dimensions down. First I check the height, and if it's more than 325px I resize it down to 325px. Then I check for width, and if the width is greater than 528px, I resize it down to 528px.
But the images are pixelated and blurry. I've put the old page back, for now, but would really like to understand why the jpg images are pixelated and blurry after going through resizeImage().
<cfif info.height gt 325> <cfset imageResize(myImage,"","325","highestQuality",0) /></cfif><cfif info.width gt 528> <cfset imageResize(myImage,"528","","highestQuality",0) /></cfif>
V/r,
^ _ ^