On Wed, 2007-06-06 at 09:46 +0200, [EMAIL PROTECTED] wrote: > mhmh... saving the knob anims in an xml file is too much hassle IMO. > my first animated knob was based on a gif animation. > > now i resorted to png because of the alpha, and gif being bad... > is the patent hassle gone now ? > > i have put all animation phases into one png. > now the problem is, that we need one integer as metadata, to find the > number of animation phases. > > Then all height and width of the knob images could be calculated. > i know, that there are fields for metadata inside a png. > > Is it possible to set and get them with GdkPixbuf ? > we should try to agree on something.
i just had a quick look around and i couldn't see where format specific meta data is exposed via the gdk-pixbuf api. i can see how presenting metadata from different formats in one interface would be hairy so it doesn't surprise me. how about encoding the number of frames into the filename? you could do it simply or insert a magic sequence to avoid spurious results. fugly tho that may be. FTR though, shipping an attendant spec file with meta data that points to the png anim seems relatively painless to me. especially as part of a library. the spec would be eminently scriptable too, although xml is overkill imo. (unless said library already uses it) with my own galan knob ancestor, i've also subclassed gdkpixbuf, adding a few vars and functions to make using animations of this sort easier. that way you can keep any extra information in one object and benefit from simple ref counting, sharing and safe clean up. this also makes it generic enough to use with other animated widgets. a mod wheel, complex slider or image sequence (for use with waveform type selectors) for example. so we should be able to solve this problem inside and out. pete. _______________________________________________ Linux-audio-dev mailing list [email protected] http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
