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

Composite output is greyscale #4271

Closed
dooman87 opened this issue Sep 24, 2021 · 2 comments
Closed

Composite output is greyscale #4271

dooman87 opened this issue Sep 24, 2021 · 2 comments

Comments

@dooman87
Copy link
Contributor

dooman87 commented Sep 24, 2021

ImageMagick version

7.1.0-6

Operating system

Linux

Operating system, version and so on

Debian Buster

Description

When using composite command the generated output is greyscale, but source images are not.

The image was generated as expected on version 7.0.7-2, but broken on the latest.

Steps to Reproduce

  1. Run composite -gravity Center image_resize.png canvas.png result.png
  2. Check that result.png is greyscale, however image_resize.png is not

Images

image_resize.png

image_resize.png

canvas.png

canvas.png

result.png

result

@snibgo
Copy link

snibgo commented Sep 24, 2021

When images are uploaded, they get renamed to 134675441-04055200-9840-4906-a831-62c0c1f9a021.png and similar, so I don't know which image is which. Please edit your post to show the name before each image.

For IM v7, I suggest using "magick", not "composite" or "magick composite". Put the input files in the opposite order (background first, and foreground second). If the background is grayscale, then the result will be grayscale. Use "-colorspace sRGB" to ensure it has three channels: R,G and B.

@dooman87
Copy link
Contributor Author

Thanks @snibgo. -colorspace sRGB solved the problem!

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

3 participants