[prev in list] [next in list] [prev in thread] [next in thread] 

List:       imagemagick-user
Subject:    RE: [magick-users] How to add an alpha channel to an image  usingperl?
From:       Glenn Randers-Pehrson <glennrp () comcast ! net>
Date:       2002-11-27 3:58:13
[Download RAW message or body]

At 01:50 PM 11/27/02 +1000, Barris, Wes (LI, Uni of Queensland) wrote:
>On Wednesday, 27 November 2002 1:16 PM Glenn Randers-Pehrson spake thusly:
>
>> Try
>> 
>> convert -matte -type TruecolorMatte junk.png junka.png
>> 
>> Otherwise the png encoder notices that the file is entirely
>> opaque and jetisons the alpha channel.
>> 
>> Glenn
>
>Assuming the above command works, even the command line version
>of "composite" produces the same incorrect output like the perl
>version.  Notice the output image is PseudoClass.  It should be
>TrueColor/DirectClass.
>
>
>Q:\media\images>identify teapot24a.png
>teapot24a.png PNG 512x512+0+0 DirectClass 8-bit 124.4k 0.0u 0:01
>
>Q:\media\images>composite -compose CopyOpacity teapot24a.png 8bitalpha.png
>test.png

Does teapot24a.png have any non-opaque pixels?  If not, then the png
encoder will notice that test.png is opaque and will jetison the
alpha channel again.  And if 8bitalpha.png has 256 or fewer colors,
test.png has 256 or fewer colors and is therefore identified as
PseudoClass.

>Q:\media\images>identify test.png
>test.png PNG 512x512+0+0 PseudoClass 256c 8-bit 1.8k 0.0u 0:01
>--
>Wes Barris
>E-Mail: Wes.Barris@csiro.au
>Phone: 07-3346-2504
>
>_______________________________________________
>Magick-users mailing list
>Magick-users@imagemagick.org
>http://studio.imagemagick.org/mailman/listinfo/magick-users
>
_______________________________________________
Magick-users mailing list
Magick-users@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic