Re: Gdk PixbufAnimation supported formats

2013-04-20 Thread Kip Warner
On Thu, 2013-04-18 at 02:08 -0700, Andrew Potter wrote:
> You can make a few png or jpg frames and hook up a g_timeout_add() callback
> to set the pixbuf on a GtkImage. I done similar when I needed to dynamically
> scale animated gifs. Be sure to stop your timeout on unmap()/unrealize(),
> especially if you have more than a handful of animated images instantiated
> anywhere.

Thanks Andrew. Advice well taken and I'll be sure to consider giving
that a try.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Gdk PixbufAnimation supported formats

2013-04-18 Thread Kip Warner
On Thu, 2013-04-18 at 10:22 +0200, Nicola Fontana wrote:
> Hi Kip,
> 
> my best suggestion is not to use animations: I hate moving things in
> apps and I'm pretty sure I'm not alone.

Hey Nicola. I hear you and I'm sure a lot of people agree. 

In this case, it's a user interface consideration that I think would add
some simple eye candy that an end user without your level of experience
and preferences might appreciate. Many other platform desktop
environments, e.g. w32 and OS X display simple animations in the shell
while transferring files, burning a disc, or what have you, and in many
cases, users of such environments form a sizable component of my target
demographics so I need to be mindful of them too.

> Given that, years ago I used a GTK+2 burning front-end [1] that
> integrated a libmng [2] animation while burning. It is coded in C
> though.

Yes, that's a good example. Sadly I'm using PyGI in a runtime
environment that can depend on nothing other than the stock runtimes
that come preloaded on the most common distros.

> Keep in mind IMO the PNG animation status is moribund.

I agree and believe that MNG and APNG are both dead or dying. I wish
there was a better way to do this that I knew about.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Gdk PixbufAnimation supported formats

2013-04-18 Thread Andrew Potter
On Thu, Apr 18, 2013 at 12:40 AM, Kip Warner  wrote:

> Thanks Tadej. It looks like the only format that supports animation that
>  I can see on my system, and perhaps everywhere at best, is GIF. Do you
> have any suggestions for another approach to a simple animation that
> supports transparency and more than 8 bit colour?


You can make a few png or jpg frames and hook up a g_timeout_add() callback
to
set the pixbuf on a GtkImage. I done similar when I needed to dynamically
scale animated gifs. Be sure to stop your timeout on unmap()/unrealize(),
especially if you have more than a handful of animated images instantiated
anywhere.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Gdk PixbufAnimation supported formats

2013-04-18 Thread Nicola Fontana
Il Wed, 17 Apr 2013 23:31:39 -0700 Kip Warner  scrisse:

> If anyone has any other suggestions, I'm all ears. Thanks.

Hi Kip,

my best suggestion is not to use animations: I hate moving things in
apps and I'm pretty sure I'm not alone.

Given that, years ago I used a GTK+2 burning front-end [1] that
integrated a libmng [2] animation while burning. It is coded in C
though.

Keep in mind IMO the PNG animation status is moribund.

Ciao.
-- 
Nicola


[1] http://graveman.tuxfamily.org/
[2] http://sourceforge.net/projects/libmng/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Gdk PixbufAnimation supported formats

2013-04-18 Thread Kip Warner
On Thu, 2013-04-18 at 09:31 +0200, Tadej Borovšak wrote:
> Gtk+ uses gdk-pixbuf [1] library to load/store images. You can check
> what image formats your library supports by calling
> gdk-pixbuf-query-loaders [2] utility.

Thanks Tadej. It looks like the only format that supports animation that
I can see on my system, and perhaps everywhere at best, is GIF. Do you
have any suggestions for another approach to a simple animation that
supports transparency and more than 8 bit colour?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Gdk PixbufAnimation supported formats

2013-04-18 Thread Tadej Borovšak
Hi.

2013/4/18 Kip Warner 
>
> I've tried looking through the Gtk+ source in gdk/* and gtk/*, but
> maybe I've just been looking in the wrong places. I also tried looking
> through what relevant documentation I could find on the Gdk's C API,
> and didn't manage to find what I needed. I'm guessing that perhaps this
> is because the actual loading is deferred to some other lower level
> external backend to Gdk, such as Cairo, but I'm speaking from
> ignorance.


Gtk+ uses gdk-pixbuf [1] library to load/store images. You can check
what image formats your library supports by calling
gdk-pixbuf-query-loaders [2] utility.

Cheers,
Tadej


[1] https://developer.gnome.org/gdk-pixbuf/stable/
[2] https://developer.gnome.org/gdk-pixbuf/stable/gdk-pixbuf-query-loaders.html

--
Tadej Borovšak
blog.borovsak.si
tadeb...@gmail.com
tadej.borov...@gmail.com
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Gdk PixbufAnimation supported formats

2013-04-17 Thread Kip Warner
Hey list,

I'm having some difficulty trying to track down the animated file
formats supported by gdk_pixbuf_animation_new_from_file(). I am using
the function via PyGI / GObject introspection. 

I know for a fact that it supports animated GIFs, but beyond that, I do
not know (e.g. MNG? APNG?). GIF works as a last resort for my purposes,
but the constraint of 256 colours is rather limiting. 

I've tried looking through the Gtk+ source in gdk/* and gtk/*, but
maybe I've just been looking in the wrong places. I also tried looking
through what relevant documentation I could find on the Gdk's C API,
and didn't manage to find what I needed. I'm guessing that perhaps this
is because the actual loading is deferred to some other lower level
external backend to Gdk, such as Cairo, but I'm speaking from
ignorance.

The reason I ask is I'd like to use some simple animation in my Gtk+ 3
/ PyGI application. The animation is really too simple to warrant
Clutter or GStreamer, but enough to at least need basic transparency
and preferably > 8 bit colour.

If anyone has any other suggestions, I'm all ears. Thanks.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list