Magick -depth 16 command changes alpha channel data

12 views Asked by At

I have a number of 8 bit png images that need to be 16 bit. Using the MAGICK -DEPTH 16 command, I thought all was well, but then discovered that the transparency was missing or incorrect.

On further investigation, I found that whilst the alpha channel was still there, it had changed. White components that were previously opaque had become transparent. I am using the Minnesota Vikings Logo as an example (Copyright of course) and the horns, which in the original are white, become transparent.

I have tried:

magick <8bitImage.png> -depth 16 -alpha transparent PNG48:<output.png>
magick <8bitImage.png> -depth 16 -alpha on PNG48:<output.png>
magick <8bitImage.png> -depth 16 -compose copy-alpha PNG48:<output.png>
magick <8bitImage.png> -depth 16 -compose copy-opaque PNG48:<output.png>

But nothing changes the fact that the white parts of the image that were masked in the alpha channel in 8 bit, are now not masked in the 16 bit.

Am I missing something obvious about the way it works? For images without transparency, it is fantastic.

0

There are 0 answers