Re: HICON to GdkPixbuf



Tor Lillqvist a écrit :
>> Does anyone have ideas about how to convert such an HICON to a GdkPixbuf?
>
> There is code in gdk/win32 to do that, check the function
> gdk_win32_icon_to_pixbuf_libgtk_only() in gdk/win32/gdkcursor-win32.c
> in GTK+. This is an internal function so you aren't supposed to call
> it. But as it is in libgdk, and is called by libgtk, it is in fact
> exported, so you *can* call it. Include <gdk/gdkwin32.h> for the
> prototype.
>
Thanks, that worked.

> Actually, I guess one could argue this is a useful function that
> should exist as a public (even if platform-specific) API, in
> libgdk-pixbuf.
>
Indeed! There's a whole serious image decoder in there, would even be nice if it were in its own library :)

Andrew





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