Try:

convert test.png -separate -swap 4,0 out.png

You should get an image written out for each channel. "out-0.png" can be
opened in Preview.app.

-s


On Fri, Feb 8, 2019 at 1:38 PM Larry Gritz <[email protected]> wrote:

> On my mac, ImageMagick "convert test.png test.tif" also results in what
> appears to be a black image.
>
> And using ImageMagick's "identify -verbose", I see these stats:
>
>     Alpha:
>       min: 0  (0)
>       max: 0 (0)
>       mean: 0 (0)
>       standard deviation: 0 (0)
>       kurtosis: -3
>       skewness: 0
>       entropy: 0
>
> Are you *sure* that the alpha channel isn't really 0 everywhere?
>
>
>
> On Feb 8, 2019, at 11:55 AM, Larry Gritz <[email protected]> wrote:
>
> Hmmm... it's not just "--ch", that image looks "black" (all 0.0 values) in
> all channels to all OIIO tools. (For example, `oiiotool -stats test.png`)
> I'm suspecting something in the reader rather than an issue with channel
> selection.
>
> Looking into it.
>
> -- lg
>
>
> On Feb 8, 2019, at 11:31 AM, Stephen Parker <[email protected]>
> wrote:
>
> Hi Larry,
>
> I'm on the release branch. Here is the PNG in question (attached).
>
> thanks
>
> On Fri, Feb 8, 2019 at 11:12 AM Larry Gritz <[email protected]> wrote:
>
>> Which version of OIIO?
>> And I don't suppose you can send me an example PNG that has the problem?
>> Or is it weird for every png you try?
>>
>>
>>
>> On Feb 8, 2019, at 10:59 AM, Stephen Parker <[email protected]>
>> wrote:
>>
>> Hello,
>>
>> I'm having some trouble using oiiotool's copy channel operator. It might
>> be user error but I wanted to check and see if it's intended behavior. I've
>> only glanced at the code so far.
>>
>> My test image is a PNG (4-channel RGBA), but only has information in the
>> Alpha. When attempting to copy the Alpha into the other 3 channels and
>> write out an RGB image (no Alpha), I get black. Imagemagick's 'convert' did
>> what I expected.
>>
>> invoked as:
>>
>> oiiotool input.png --ch "R=A,G=A,B=A" -o output.png
>>
>> I also tried using the numeric channel labels to no avail.
>>
>> -sp
>> _______________________________________________
>> Oiio-dev mailing list
>> [email protected]
>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>>
>>
>> --
>> Larry Gritz
>> [email protected]
>>
>>
>>
>>
>> _______________________________________________
>> Oiio-dev mailing list
>> [email protected]
>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>>
> <test.png>_______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
>
> --
> Larry Gritz
> [email protected]
>
>
>
>
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
>
> --
> Larry Gritz
> [email protected]
>
>
>
>
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to