Page 1 of 1

Question about "-combine" with IM 7.0.5-5

Posted: 2017-04-28T18:12:41-07:00
by GeeMack
Bringing this question over from the Users forum at the suggestion of some more experienced users...

----------

Running IM 7.0.5-5 HDRI on Windows 10 64. The "-combine" example found at THIS link has always worked for me until this most recent release 7.0.5-5. If I start with this image as input...

Image

Then I run it through these two commands from the example page...

Code: Select all

magick input.png -channel RGB -separate input-%d.png

magick input-0.png input-1.png input-2.png -channel RGB -combine output.png
The output should be an exact reproduction of the original input. Instead what I get is this semi-transparent grayscale image...

Image

I've found that I can make the separated images reassemble properly by adding a "-colorspace sRGB" before "-combine" like this...

Code: Select all

magick input-0.png input-1.png input-2.png -channel RGB -colorspace sRGB -combine output.png
And that is even mentioned in the usage discussion at THIS link. But I've generated literally tens of thousands of images using "-combine" without ever needing a colorspace specifier, and suddenly the behavior has changed. Does anyone know if this is a recent bug, or if it's going to be what we should expect from the default use of "-combine"?

Re: Question about "-combine" with IM 7.0.5-5

Posted: 2017-05-08T12:31:23-07:00
by fmw42
This issue does not seem to be fixed in the latest beta as of today.

Re: Question about "-combine" with IM 7.0.5-5

Posted: 2017-05-08T16:33:24-07:00
by magick
Your command set for ImageMagick 7.0.5 should be:

Code: Select all

magick input.png -separate input-%d.png
magick input-0.png input-1.png input-2.png -colorspace sRGB -combine output.png
The colorspace option is required to create the initial canvas to combine the layers into. See https://www.imagemagick.org/script/porting.php.

Re: Question about "-combine" with IM 7.0.5-5

Posted: 2017-05-08T17:29:39-07:00
by fmw42
magick wrote: 2017-05-08T16:33:24-07:00 Your command set for ImageMagick 7.0.5 should be:

Code: Select all

magick input.png -separate input-%d.png
magick input-0.png input-1.png input-2.png -colorspace sRGB -combine output.png
The colorspace option is required to create the initial canvas to combine the layers into. See https://www.imagemagick.org/script/porting.php.
Is it not feasible to default to sRGB for combine, when 3 channels are provided? That would keep backward compatibility with IM 6.

Re: Question about "-combine" with IM 7.0.5-5

Posted: 2017-05-09T03:48:47-07:00
by magick
We'll add a patch by sometime tomorrow to support backward compatibility.

Re: Question about "-combine" with IM 7.0.5-5

Posted: 2017-05-09T09:08:57-07:00
by fmw42
magick wrote: 2017-05-09T03:48:47-07:00 We'll add a patch by sometime tomorrow to support backward compatibility.
Thanks.

By the way, the options page at http://www.imagemagick.org/script/comma ... hp#combine does not explain what +combine does. It is mentioned in the porting documentation without explanation. Would you provide an explanation on the options page, please?