Highlighted

Coldfusion resize making image files bigger?

Explorer ,
Mar 05, 2018

Copy link to clipboard

Copied

So I have an image loader that before it uploads the file to Amazon S3 it optimises the image by using this code:

<cfset ImageScaleToFit(myImage,1260,"")>

<cfset imageWrite(myimage,"newImagelocation", 0.9)>

The odd thing is that if I upload an image that is already 1260 wide and 24k in size, then optimise it using the above code, the image becomes 34k in size.

Why would optimizing an image make it bigger?

Views

212

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Coldfusion resize making image files bigger?

Explorer ,
Mar 05, 2018

Copy link to clipboard

Copied

So I have an image loader that before it uploads the file to Amazon S3 it optimises the image by using this code:

<cfset ImageScaleToFit(myImage,1260,"")>

<cfset imageWrite(myimage,"newImagelocation", 0.9)>

The odd thing is that if I upload an image that is already 1260 wide and 24k in size, then optimise it using the above code, the image becomes 34k in size.

Why would optimizing an image make it bigger?

Views

213

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 05, 2018 0
BKBK LATEST
Adobe Community Professional ,
Mar 07, 2018

Copy link to clipboard

Copied

You invoke imageScaleToFit() using the default value of the attribute interpolation, which is "highestQuality". In addition, you invoke imageWrite() using a quality value of 0.9, which is higher than the default, 0.75.

A larger file size is the price you pay for quality, I suppose. Just saying.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 07, 2018 0