Page 1 of 1

v7 -separate and alpha

Posted: 2016-05-16T22:27:44-07:00
by snibgo
I suppose this is a feature of v7, rather than a bug. If so, perhaps it could be mentioned in the v7 porting guide. (It took me two days to pin down.)

Suppose we have an image with RGBA channels, and we "-separate".

The default output under v6 is three grayscale images, for each of R,G and B.

The default output under v7 is different. We get four grayscale images, for each of R,G,B and A.

For v6 or v7, we can use "-channel RGB" or "-channel RGBA" to deliberately exclude or include alpha.

Of course, when the v7 input file is grayscale, the default is to create one or two outputs, depending on whether the input has alpha.

When porting v6 scripts, to get the same three outputs, it seems generally sensible to replace ...

Code: Select all

-separate
... with ...

Code: Select all

-colorspace sRGB -channel RGB -separate