Re: saving ICOs



On Sun, 2003-06-29 at 11:45, Matthias Clasen wrote:
> Am Son, 2003-06-29 um 17.21 schrieb Owen Taylor:
> > On Sun, 2003-06-29 at 10:41, Matthias Clasen wrote:
> > > So, in order to make gdk_cursor_new_from_pixbuf() implementable on
> > > Win32, I'm currently writing code to save ICOs. 
> > 
> > I don't believe this is the right approach on Windows. I did some
> > looking at this the other day and what you want to do is use
> > CreateIconIndirect(). The usage is far from obvious, but there
> > are some detailed instructions at:
> > 
> >  http://www.dotnet247.com/247reference/msgs/13/66301.aspx
> >  
> > for the WinXP case of alpha pixmaps. The same general approach is
> > probably right for older versions that only support colored icons,
> > though I'm sure the checks to figure out what to use where will
> > be messy.
> 
> Thanks for the pointer. So it is possible to create RGBA cursors on
> Windows without loading them from a file, nice. But is the same true for
> animated cursors ? I've only found LoadCursorFromFile for that so we
> will still need to be able to save .ANI files (and thus ICO embedded in
> them) for animated cursors. 

I sort of hate to bring it up at this point (though better now than
later). But perhaps we should just skip gdk_cursor_new_from_pixbufs()?

 - It's not supported for classic X cursors
 - It will require a hideous hack on windows
 - I can't think of a single valid use case (except perhaps an
   animated cursor editor, and such an editor would need it's
   own saving code.)

> > I guess my opinion would be to avoid such hacks unless we absolutely 
> > positively need them. If we do want to support multiple-size saving,
> > I suspect that adding a specific API for it would be better.
> 
> Yes, it occurred to me that it would fit nicely with the image
> collection stuff that is somewhere in bugzilla.

http://bugzilla.gnome.org/show_bug.cgi?id=65902

Yes, it would seem to be gdk_pixbuf_collection_save(). Looking
over that bug report, one thing that strikes me is that the idea
of pixbuf-collections is strongly related to what you need for
good handling of SVG and other scalable formats - the ability
to load the file once, then render it at multiple sizes.

Regards,
						Owen





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