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

magick -gamma 0 does not produce black image #8

Open
pgajdos opened this issue Jan 15, 2025 · 2 comments
Open

magick -gamma 0 does not produce black image #8

pgajdos opened this issue Jan 15, 2025 · 2 comments

Comments

@pgajdos
Copy link

pgajdos commented Jan 15, 2025

The result of

magick test.png -gamma 0 -alpha off black_gamma.png

does not produce all-black image as described in https://usage.imagemagick.org/canvas/, but:

black_gamma

This is similar to ImageMagick/ImageMagick#1151

Tested with 7.1.1-43.

@pgajdos
Copy link
Author

pgajdos commented Jan 15, 2025

magick convert produces expected result, i. e. all-black image.

@fmw42
Copy link

fmw42 commented Jan 18, 2025

I believe that there is a bug in -gamma. It is not processing the rgb channels properly on certain images. When I do.

magick logo: -transparent white logot.png

magick logot.png -gamma 0 -alpha off x.png

Image

But the result should be totally black.

I have also tried

magick logot.png -alpha off -channel rgb -gamma 0 x.png

and

magick logot.png -alpha deactivate -gamma 0 x.png

but get the same results.

This is strange

This fails:
magick logo: -gamma 0 -alpha off y.png

Image

and also

magick lena.png -gamma 0 -alpha off z.png

Image

So it looks like the red channel is not processed or possibly pure red, not processed.

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

No branches or pull requests

2 participants