GIFs Using Tkinter

Discussion in 'Python' started by Gregor Lingl, Sep 8, 2003.

  1. Gregor Lingl

    Gregor Lingl Guest

    I'm trying to use recipe 9.5 from Python Cookbook, which suggests
    to read gifs from files using base64.encodestring in order to embed
    those images into my sourcecode.

    I've prepared some 20 gifs with Photoshop which are all merely
    rotated versions of some "master"-gif. (They all are produced in
    exactly the same way and have (255,255,255) as transparent color.)

    They all can be used as Tkinter PhotoImages with the file-option
    perfectly well.

    However, if I try to use the data-option with strings constructed
    from those same gifs according to the recipe mentioned above,
    I observe, that among those gif-images
    (1) some can be displayed correctly (more than 50%)
    (2) some are corrupted and are displayed with stripes or other
    artefacts.
    (3) and some result in strings only a few characters long
    which cannot be interpreted as image-data at all.

    What could be the reason for this annoying behaviour and how
    can I avoid it.

    Thanks in advance

    Gregor
     
    Gregor Lingl, Sep 8, 2003
    #1
    1. Advertisements

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. edJames

    Saving GIFs in CGI

    edJames, Jul 23, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,557
    edJames
    Jul 23, 2003
  2. RC
    Replies:
    1
    Views:
    501
    mortb
    Nov 11, 2004
  3. Jim Bancroft
    Replies:
    5
    Views:
    506
    clintonG
    Dec 31, 2004
  4. Dale Reed

    animated gifs with codebehind...

    Dale Reed, Mar 16, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    3,522
    Dale Reed
    Mar 17, 2006
  5. Gregor Lingl

    GIFs Using Tkinter

    Gregor Lingl, Sep 8, 2003, in forum: Python
    Replies:
    1
    Views:
    329
    Jeff Epler
    Sep 8, 2003
  6. Gregor Lingl

    GIFs Using Tkinter

    Gregor Lingl, Sep 8, 2003, in forum: Python
    Replies:
    0
    Views:
    351
    Gregor Lingl
    Sep 8, 2003
  7. Replies:
    1
    Views:
    733
    Travis Newbury
    Sep 13, 2006
  8. Terry Reedy
    Replies:
    5
    Views:
    764
    Robert Kern
    Nov 30, 2010
Loading...