Re: png transparency with PIL



Robin Becker wrote:

I'm trying to determine the transparency information for a png
image. With gif images I can determine the colour that is used for
transparent areas using im.info['transparency']. For the png
images of interest there is no such entry in the info dict. I
assume that's because of the way png does transparency. I'm
guessing I need the alpha channel, but is there a way to get hold
of it?

For accessing the alpha channel, there is an RGBA mode for PNG
files:

http://www.pythonware.com/library/pil/handbook/format-png.htm

Regards,


Björn

--
BOFH excuse #58:

high pressure system failure

.



Relevant Pages

  • Re: MFC Feature Pack Images
    ... I did manage to edit some images. ... they are 32-bit color images with an alpha channel. ... Transparent areas show simply as black, but I'm thinking an alpha channle is being used or something. ...
    (microsoft.public.vc.mfc)
  • Re: Email form in 2003
    ... would actually suggest that you enable the png option. ... You might try ungrouping those images first, Publish to the web and looking ... As per your navbar, ... being converted into the .wmz files, but I don't know why you are ...
    (microsoft.public.publisher.webdesign)
  • Re: Email form in 2003
    ... When you install it just make sure to opt out of making it your default ... would actually suggest that you enable the png option. ... all the images on the home page together, because in FF, they have been ... As per your navbar, ...
    (microsoft.public.publisher.webdesign)
  • Re: Email form in 2003
    ... would actually suggest that you enable the png option. ... You might try ungrouping those images first, Publish to the web and looking ... As per your navbar, ... being converted into the .wmz files, but I don't know why you are ...
    (microsoft.public.publisher.webdesign)
  • Re: Email form in 2003
    ... The only problem found is in FireFox, the HOME return button does not work, ... would actually suggest that you enable the png option. ... all the images on the home page together, because in FF, they have been ... As per your navbar, ...
    (microsoft.public.publisher.webdesign)