Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Loading an exe icon into a pixmap/bitmap

344 views
Skip to first unread message

ob....@gmail.com

unread,
Dec 12, 2007, 1:09:41 AM12/12/07
to
I've been searching for a way to load an icon from an executable into
something that I can eventually display either through pygame or
pygtk. I've tried the stuff found at
http://groups.google.com/group/comp.lang.python/browse_thread/thread/d7f61f270cce368/3ff38c1ced504e43?lnk=gst&q=win32+icon#3ff38c1ced504e43
but the tests just output all black (not surprising, as that guy
couldn't get it to work either). I've mucked around with taht code and
the ExtractIcon stuff from pywin32, but still am stuck. I've seen some
reference to a wxpython ways to do it, but I'm trying to not have to
convert over to that. Any help is appreciated. Thanks

Shane Geiger

unread,
Dec 12, 2007, 1:20:39 AM12/12/07
to ob....@gmail.com, pytho...@python.org
Are you looking for these kinds of tools?


In Debian:
icoutils - Extract MS Windows icons and cursors

I don't recall where I saw this:
FileJuicer - Extract images from Powerpoint, PDF, HTML, and CAB files


--
Shane Geiger
IT Director
National Council on Economic Education
sge...@ncee.net | 402-438-8958 | http://www.ncee.net

Leading the Campaign for Economic and Financial Literacy

kyos...@gmail.com

unread,
Dec 12, 2007, 9:14:12 AM12/12/07
to
On Dec 12, 12:09 am, ob.l...@gmail.com wrote:
> I've been searching for a way to load an icon from an executable into
> something that I can eventually display either through pygame or
> pygtk. I've tried the stuff found athttp://groups.google.com/group/comp.lang.python/browse_thread/thread/...

> but the tests just output all black (not surprising, as that guy
> couldn't get it to work either). I've mucked around with taht code and
> the ExtractIcon stuff from pywin32, but still am stuck. I've seen some
> reference to a wxpython ways to do it, but I'm trying to not have to
> convert over to that. Any help is appreciated. Thanks

wxPython uses an included tool called img2py. The source looks pretty
straight-forward. You may be able to modify it or re-create it using
your GUI toolkit of choice.

If you install wxPython, you'll find it (approx.) here:

C:\Python24\Lib\site-packages\wx-2.8-msw-unicode\wx\tools

Mike

0 new messages