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

Disable sharpening with mini magick by default #67

Merged

Conversation

flori
Copy link
Contributor

@flori flori commented Mar 18, 2020

The sharpening causes visible rough edges to appear in resized jpeg
images.

The sharpening causes visible rough edges to appear in resized jpeg
images.
@janko
Copy link
Owner

janko commented Mar 20, 2020

This is not an easy decision, because if we remove sharpening, we will get a blurrier result, so it's a trade-off.

I would rather improve sharpening parameters so that it's perhaps milder and doesn't produce visible rough edges.

I'm also preparing to add an option to globally disable sharpening. I started this locally, I'll push it out shortly.

@flori
Copy link
Contributor Author

flori commented Mar 20, 2020

This is not an easy decision, because if we remove sharpening, we will get a blurrier result, so it's a trade-off.

I would rather improve sharpening parameters so that it's perhaps milder and doesn't produce visible rough edges.

I'm also preparing to add an option to globally disable sharpening. I started this locally, I'll push it out shortly.

We were getting complaints from users, that the high quality and high resolution jpegs they uploaded, became distorted after we resized and compressed them to be delivered on the web.

We first suspected that the jpeg compression parameters, that we changed a while ago, were too aggressive, but it turned out that resizing itself caused the problem. I only found out about this by outputting all executions of ImageMagick commands and noticing that suddenly there was sharpening done as well and that the problem was ultimately caused by a recent carrierwave and dependencies update. I think it's difficult to understand that resizing alone can cause such artefacts, so maybe it's better not to sharpen by default?

Or maybe the sharpening works better with VIPS, but some of the really good original images our users uploaded ended to look really bad as a result of this sharpening with ImageMagick. I also found one image where the user blurred the image beforehand on a second upload attempt to work around the problem. The result did look way blurrier than it would have with just the resizing.

@janko
Copy link
Owner

janko commented Mar 20, 2020

Thank you for the clarification, that indeed sounds like a bad default for ImageMagick then. I'll merge the change shortly and release a new version.

@janko
Copy link
Owner

janko commented May 17, 2020

Ok, after carrierwaveuploader/carrierwave#2481 I'm entirely convinced this is the path forward, merging and releasing a new version.

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

Successfully merging this pull request may close these issues.

None yet

2 participants