473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

img2pytk.py ; any users out there ?

<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

Jul 18 '05 #1
1 1081

"Gary Duncan" <gm******@netspace.net.au> wrote in message news:3F**************@netspace.net.au...

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+CindtcicOJBEUC09JUHQlQFIkMUNGc rF5bMldpKBQ'
...........
'zlh8z1/d1RDNBxBABlaA1fZsz1bA1MltBV+g3AxMDYSpEZU9tRIQEAA7' )

--
Georgy Pruss
E^mail: 'ZDAwMTEyMHQwMzMwQGhvdG1haWwuY29t\n'.decode('base6 4')
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Jason | last post by:
Let's say I have an html form with 20 or 30 fields in it. The form submits the fields via POST to a php page which updates a table in a database with the $_POST vars. Which makes more sense? ...
1
by: deko | last post by:
Can I use PHP and htaccess to authenticate users? My service provider lets me password protect directories on my web site - using htaccess. If a user tries to access a page within a password...
12
by: Dave Smithz | last post by:
Hi there, Users of my PHP DB application have complained that it seems to log them out every now and then. I actually assume this is when it has been idle for sometime as I use session variables...
4
by: zsh-users-help | last post by:
Hi! This is the ezmlm program. I'm managing the zsh-users@sunsite.dk mailing list. To confirm that you would like python-list@python.org removed from the zsh-users mailing list, please send...
43
by: Dimitri Debruyne | last post by:
Hi group I am in the process of developing a website in XHTML Strict and CSS. Is there a way to open a link in a new window without the use of frames or Javascript or something ? I didn't find a...
1
by: ABC | last post by:
I want learn how to handle the web site which allow internal users (windows network users and internal browser users without windows network login) and external users including cookie and...
5
by: B1ackwater | last post by:
We've fooled around with Access a bit, but only using the single-user store-bought version. It seems to be a good database - versatile and infinitely programmable - and can apparently be used as a...
12
by: Jan | last post by:
Hi: I've got the Error 3197 problem ("The Microsoft Jet database engine stopped the process because you and another user are attempting to change the same data at the same time.") in a client...
9
by: Access | last post by:
In my user interface if a user doesn't have access to a field in the database I lock it and make the background color yellow. Problem is I'm maintaining permissions in two different places. On...
14
by: Betray | last post by:
We have a AD running on win2k3. We have many shared folders. Ive noticed that once in a while users will call up and report the folders missing. To fix the issue i would reboot the system. And vola...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.