Loading an exe icon into a pixmap/bitmap

O

ob.lutz

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...d504e43?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
 
S

Shane Geiger

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


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...d504e43?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
IT Director
National Council on Economic Education
(e-mail address removed) | 402-438-8958 | http://www.ncee.net

Leading the Campaign for Economic and Financial Literacy
 
K

kyosohma

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
 

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

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top