Loading multiple images from a .ico file



Hi GTK list

I'm trying to load multiple images from one .ico file, but fail to see a way
to do this.

I'm working on TortoiseHg which is a PyGTK application on Windows.

I would like to set a particular dialog icon to a 16x16 image, and the
corresponding Windows "Alt-Tab" icon to a 32x32 image. This can be done
nicely with gtk.Window.set_icon_list [1]

The problem is that the images are both present in the same .ico file. I
have not been able to find a function that allows me to load multiple images
from one .ico file. For example, gtk.gdk.pixbuf_new_from_file_at_size [2]
will always scale the largest image, instead of loading the image with the
specified resolution.

Is this possible, or will I have to separate the images into separate files?

I have asked this question on the PyGTK list but got no answer [3]

Regards,
Peer



[1]
http://www.pygtk.org/docs/pygtk/class-gtkwindow.html#method-gtkwindow--set-icon-list

[2]
http://www.pygtk.org/docs/pygtk/class-gdkpixbuf.html#function-gdk--pixbuf-new-from-file-at-size

[3] http://www.mail-archive.com/pygtk daa com au/msg15968.html



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]