Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.0+ (that starts using ImageProcessing gem) increases image sharpness and increases file size #2481

Closed
feliperaul opened this issue May 17, 2020 · 3 comments

Comments

@feliperaul
Copy link

I know version 2.0.0 is almost one year old by now, but I only managed to migrate from 1.3.1 this weekend.

I expected no change in image quality and file size when upgrading from 1.3.1, but what I saw was a visible image degradation (due to excessive artificial sharpening) and increased file size after the migration.

I'm going to show 2 pictures as examples. I recommend opening Carrierwave's versions in new tabs so you can see the images in full size to notice the difference.

Original file (66kb):

image

Uploaded with Carrierwave 1.3.1 (66kb):

image

Uploaded with Carrierwave 2.0+ (72kb):

image

Now picture #2

Original file (386kb):

image

Uploaded with Carrierwave 1.3.1 (385kb):
image

Uploaded with Carrierwave 2.0+ (429kb):

image

In both cases, there's undeniable increase of sharpness, but I didn't ask for that (even if you regard Carrierwave's 2.0+ version as better-looking than 1.3's, it's undeniable that the 1.3.1 version is much closer to the original, as expected, since the only processing done on the uploader was a crop).

Also, Carrierwave 2.0+ increases file sizes from 9 to 20% when compared to version 1.3.1.

I know it's a huge change in the codebase and I understand the reasoning behind it, but I think this change in quality and in sharpness was a substancial regression when comparing 1.3.1 to 2.0.0+.

Im pinging @janko and @mshibuya since they worked on issue #2298 where this change was implemented.

@janko
Copy link
Contributor

janko commented May 17, 2020

Thank you for the detailed issue report, I deeply apologize for breaking backwards compatibility. This issue has been brought up in janko/image_processing#67, but I got side-tracked and never merged it.

This is now merged and released in ImageProcessing 1.11.0, which doesn't sharpen by default anymore.

CarrierWave could either require version ~> 1.11 from now on, or we can rely on people that are upgrading to automatically install the latest ImageProcessing gem.

@feliperaul
Copy link
Author

@janko Thanks for the quick response and for the amazing work on your gem janko! I'll try to update and re-do the tests and report back.

@mshibuya
Copy link
Member

Closing since this was fixed in ImageProcessing side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants