Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Manipulating GIF image frames w/ PIL - where'd my palette go?

Reply
Thread Tools

Manipulating GIF image frames w/ PIL - where'd my palette go?

 
 
skip@pobox.com
Guest
Posts: n/a
 
      09-04-2006
I'm unclear how PIL handles multi-frame GIF images. I have such a GIF image
in a file, bogus.gif. I can view the individual frames like so
(ImageSequence is from the PIL tutorial):

>>> img = Image.open("bogus.gif")
>>> for frame in ImageSequence(img):

... frame.show()

All but the first image appears black-and-white. They apparently lose the
color palette associated with the overall image. The palette for the
original image and the individual frames is the same, the histograms suggest
they have more than two colors and both the image the frames have mode 'P'.
What have I missed?

Thx,

Skip

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PIL: problem to convert an image array to PIL format Sverre Python 2 12-17-2009 04:33 PM
Retrieve a GIF's palette entries using Python Imaging Library (PIL) Stuart Python 1 01-19-2006 10:51 AM
How to convert a base 64 encoded GIF image to a *.gif file? hb ASP .Net 6 09-28-2004 08:24 PM
PIL: How to use a palette? Antoon Pardon Python 1 06-18-2004 05:10 PM
Displaying Palette Tiff Image using JAI (very slow when scale operation is performed) atusc Java 1 06-04-2004 05:24 AM



Advertisments