image_processing icon indicating copy to clipboard operation
image_processing copied to clipboard

Please disable default image sharpening in the VIPS backend

Open pyridine opened this issue 2 years ago • 3 comments

Hi, this is related to https://github.com/carrierwaveuploader/carrierwave/issues/2481 and https://github.com/janko/image_processing/pull/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

pyridine avatar Aug 30 '23 20:08 pyridine

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://www.diffchecker.com/image-compare/

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

midnight-wonderer avatar Aug 02 '24 13:08 midnight-wonderer

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.

janko avatar Aug 02 '24 18:08 janko

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

formigarafa avatar Sep 11 '24 22:09 formigarafa