img2pytk.py ; any users out there ?

G

Gary Duncan

<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
 
G

Georgy Pruss

Gary Duncan said:
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')
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top