img2pytk.py ; any users out there ?

Discussion in 'Python' started by Gary Duncan, Oct 26, 2003.

  1. Gary Duncan

    Gary Duncan Guest

    <ASIDE>

    [Messrs Martelli and Mertz can skip this ]

    I've been away from this group for a while and have now on return,
    noticed "the old order changeth, giving away to the newbies" ;)

    (It's almost an embarassment to actually discuss a real-live working
    bit of Python, instead of referring to theoretical issues concerning
    Haskells/monads/gonads - whatever they are )

    </ASIDE>

    I've found this little utility quite handy for generating .py files
    for displaying images ; the image strings can also be cut out
    and transplanted elsewhere. (Google for Tkinter, PhotoImage if curious)

    The original had a serious/fatal performance problem concerning big
    images which I've fixed (string concatenation issue; ''.join() needed
    :). Also
    the image wasn't shrunk to fit on the window; this has been fixed.

    In fairness, I think the original program was conceived to handle
    itsy-bitsy images of say about 100pix square, so I don't want to
    appear critical of the author.


    So the question is ;

    is this utility used much ? If so I'd distribute the 'fixed' version,
    otherwise keep it for my own private use .

    - Gary
     
    Gary Duncan, Oct 26, 2003
    #1
    1. Advertising

  2. Gary Duncan

    Georgy Pruss Guest

    "Gary Duncan" <> wrote in message news:...
    >
    > The original had a serious/fatal performance problem concerning big
    > images which I've fixed (string concatenation issue; ''.join() needed


    You can even change it to "literal concatenation" :)

    img00 = tk.PhotoImage(format='gif',data=
    'R0lGODlhQABVAPcAAAoFB45/ZE8zb1BDMGxZcEwWPvHAqGpgpoiBuh4jFbRe'
    'cMSgisQydHRmT0IEFY+CindtcicOJBEUC09JUHQlQFIkMUNGcrF5bMldpKBQ'
    ...........
    'zlh8z1/d1RDNBxBABlaA1fZsz1bA1MltBV+g3AxMDYSpEZU9tRIQEAA7')



    --
    Georgy Pruss
    E^mail: 'ZDAwMTEyMHQwMzMwQGhvdG1haWwuY29t\n'.decode('base64')
     
    Georgy Pruss, Oct 26, 2003
    #2
    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. ABC
    Replies:
    1
    Views:
    407
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Oct 24, 2005
  2. Rob Sang via JavaKB.com

    Any Netbeans users out there?

    Rob Sang via JavaKB.com, Mar 8, 2005, in forum: Java
    Replies:
    3
    Views:
    346
    Thomas Kellerer
    Mar 8, 2005
  3. Petec
    Replies:
    2
    Views:
    353
    Joey \Ninwa\ Bleau
    Apr 17, 2004
  4. Bobby Edward

    Any mac users doing .NET out there?

    Bobby Edward, Apr 18, 2009, in forum: ASP .Net
    Replies:
    7
    Views:
    495
    Bobby Edward
    May 4, 2009
  5. Eric Danstron

    Are there ANY good forums out there anymore???

    Eric Danstron, Sep 21, 2005, in forum: ASP General
    Replies:
    1
    Views:
    152
    Immediacy
    Sep 22, 2005
Loading...

Share This Page