Question about "-combine" with IM 7.0.5-5

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Question about "-combine" with IM 7.0.5-5

Post 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"?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post by fmw42 »

This issue does not seem to be fixed in the latest beta as of today.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

We'll add a patch by sometime tomorrow to support backward compatibility.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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?
Post Reply