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

Please disable default image sharpening in the VIPS backend #113

Open
pyridine opened this issue Aug 30, 2023 · 3 comments
Open

Please disable default image sharpening in the VIPS backend #113

pyridine opened this issue Aug 30, 2023 · 3 comments

Comments

@pyridine
Copy link

pyridine commented Aug 30, 2023

Hi, this is related to carrierwaveuploader/carrierwave#2481 and #67
Default image sharpening was disabled a while back in the ImageMagick backend, but not in the VIPS backend. I think it should be disabled by default in both. The default sharpening behavior is not expected and can degrade/change the image quality.

Here are the results of resizing an image in VIPS vs ImageMagick:

Base image
base image
Converted with ImageMagick backend
converted with imagemagic backend, it appears the same
Converted with VIPS backend
converted with vips backend, it looks worse

As with the original issue, the ImageMagick-processed image has not changed (much?), while VIPS-processed image appears lower quality, or at least different, which is not expected.

I used this code:

processed = ImageProcessing::Vips # or MiniMagick
  .source(base_image)
  .resize_to_fit(1280,720) # the image is already this size, so this shouldn't change anything
  .convert("png")
  .call
@midnight-wonderer
Copy link

Your eyes are really good; I couldn't tell the difference.
For those who are like me, here is where to look:
diff
Created with: _ttps:https://www.diffchecker.com/image-compare/

P.S. I could see it in the original post once pointed out.

@janko
Copy link
Owner

janko commented Aug 2, 2024

I plan to disable automatic sharpening in libvips for the upcoming major release. I agree it's unexpected, and it would be consistent with disabling it for the MiniMagick backend. I will still keep a default sharpen mask that can be turned on.

@formigarafa
Copy link

I'm impressed with what you guys can see. Thank you for that, but I didn't. ❤️

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

4 participants