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

convert -sharpen on a CMYK image causes weird visual artifacts to appear (black horizontal stripes or black color being mostly missing) #299

Closed
MatmaRex opened this issue Nov 12, 2016 · 4 comments
Labels

Comments

@MatmaRex
Copy link

Calling convert -sharpen on a CMYK image causes weird visual artifacts to appear (black horizontal stripes or black color being mostly missing).

Examples (generated with ImageMagick 6.9.0-0 Q16 x64 2014-11-14 on Windows, but I tested multiple versions with same results):

  • convert P.J._Proby_2007.jpg -sharpen 0x1 out.jpg Original Result
  • convert Google_Code-in_logo_2016.jpg -sharpen 0x1 out.jpg Original Result

This is not specific to these images, converting the logo to CMYK and sharpening produces the same issue:

  • convert -colorspace CMYK logo: -sharpen 0x1 out.jpg Result

This affects ImageMagick 6.8.4-0 and later, up to 6.9.6 (the latest release at the moment). It doesn't affect ImageMagick 7.x, or ImageMagick 6.8.3-10. It seems to be distinct from CMYK thumbnailing issues that plagued older versions (around 6.5) and have been fixed back then.

I have a more detailed investigation of this for Wikimedia, where this is currently causing some thumbnails to appear incorrectly: https://phabricator.wikimedia.org/T141739. We're currently considering downgrading ImageMagick or reverting changes since 6.8.3-10 and building a custom version.

(There is no alternative or workaround: -convolve is affected by the same bug, while -unsharp is apparently affected by some completely different bug that I didn't investigate.)

@fmw42
Copy link

fmw42 commented Nov 12, 2016

A workaround until the IM developers can investigate is to convert your CMYK image to sRGB (preferably with profiles), then process, then if necessary convert back to CMYK, if you must have a CMYK result.

@mikayla-grace
Copy link

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.

@mikayla-grace
Copy link

We released ImageMagick 6.9.6-5. It converts your CMYK images properly without any visual artifacts.

@dlemstra dlemstra added the bug label Nov 16, 2016
@MatmaRex
Copy link
Author

Thank you!

urban-warrior pushed a commit to ImageMagick/ImageMagick6 that referenced this issue Dec 17, 2020
urban-warrior pushed a commit to ImageMagick/ImageMagick6 that referenced this issue Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants