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

Discussion in 'Python' started by skip@pobox.com, Sep 4, 2006.

  1. Guest

    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
     
    , Sep 4, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hb
    Replies:
    6
    Views:
    9,153
  2. atusc
    Replies:
    1
    Views:
    4,232
  3. Antoon Pardon

    PIL: How to use a palette?

    Antoon Pardon, Jun 16, 2004, in forum: Python
    Replies:
    1
    Views:
    399
    Fredrik Lundh
    Jun 18, 2004
  4. Stuart
    Replies:
    1
    Views:
    495
  5. Sverre
    Replies:
    2
    Views:
    3,604
    Sverre
    Dec 17, 2009
Loading...

Share This Page