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: 482
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 » 2017-04-28T18:12:41-07:00

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: 22232
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2017-05-08T12:31:23-07:00

This issue does not seem to be fixed in the latest beta as of today.

User avatar
magick
Site Admin
Posts: 10698
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick » 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.

User avatar
fmw42
Posts: 22232
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2017-05-08T17:29:39-07:00

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: 10698
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick » 2017-05-09T03:48:47-07:00

We'll add a patch by sometime tomorrow to support backward compatibility.

User avatar
fmw42
Posts: 22232
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2017-05-09T09:08:57-07:00

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