Re: cursor icon hotspots with PNG
Why not provide the hotspot information as a separate, editable file? That means that people don't have to go poking through some obscure PNG chunks to find and edit data they're looking for. On Tue, Jul 15, 2014 at 2:09 AM, John Emmas wrote: > On 14/07/2014 13:35, Paul Davis wrote: > >> does anyone know of any good (i.e. non-hacky) ways to define/provide >> cursor icon hotspots with PNG files, the way one can with various other >> image formats more intended for this purpose? >> >> > Hi Paul, > > I'm not massively familiar with PNG but according to its spec, the > ancillary chunk contains a couple of 'text' fields which can be used for > storing name/value pairs. It would essentially be private data of course > (i.e. non-portable) but would that help you at all? (if the data isn't > present you simply assume 0,0 as the hotspot). > > According to Wikipedia there have been several extensions to the original > PNG format but AFAICT none of them seem to offer this, which is quite > weird... > > John > > ___ > gtk-list mailing list > gtk-list@gnome.org > https://mail.gnome.org/mailman/listinfo/gtk-list > -- Jasper ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: cursor icon hotspots with PNG
On 14/07/2014 13:35, Paul Davis wrote: does anyone know of any good (i.e. non-hacky) ways to define/provide cursor icon hotspots with PNG files, the way one can with various other image formats more intended for this purpose? Hi Paul, I'm not massively familiar with PNG but according to its spec, the ancillary chunk contains a couple of 'text' fields which can be used for storing name/value pairs. It would essentially be private data of course (i.e. non-portable) but would that help you at all? (if the data isn't present you simply assume 0,0 as the hotspot). According to Wikipedia there have been several extensions to the original PNG format but AFAICT none of them seem to offer this, which is quite weird... John ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list
Re: cursor icon hotspots with PNG
On Mon, 2014-07-14 at 08:35 -0400, Paul Davis wrote: > does anyone know of any good (i.e. non-hacky) ways to define/provide cursor > icon hotspots with PNG files, the way one can with various other image > formats more intended for this purpose? No, but if you find one, please let me know, we have the same problem in GIMP. You could use PNG text text tags and save the PNG with gdk_pixbuf_savev(), look at gimp/libgimpthumb/gimpthumbnail.c (gimp_thumbnail_save) but that would require to hack up rules for generating the cursor PNGs. I think there is no way without a hack, you either have them hardcoded in your app and use plain PNG files, or have them hardcoded in some other place and generate the PNGs that contain the right text tags. --Mitch ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list