GNOME Bugzilla – Bug 335752
Loading GIF Animation with GdkPixbufLoader returns static image if "gdk_pixbuf_loader_set_size" is called in "size-prepared" signal handler
Last modified: 2010-07-10 04:07:57 UTC
Please describe the problem: Loading a GIF animation with GdkPixbufLoader will return only a static image if "gdk_pixbuf_loader_set_size" is called in the "size-prepared" signal handler. Steps to reproduce: 1. Create a GdkPixbufLoader, connect the "size-prepared" signal handler. 2. In the "size-prepared" handler, call gdk_pixbuf_loader_set_size to set the desired size. 3. When finished loading, call gdk_pixbuf_loader_get_animation to get the animation and then call gdk_pixbuf_animation_is_static_image Actual results: gdk_pixbuf_animation_is_static_image returns TRUE Expected results: gdk_pixbuf_animation_is_static_image returns FALSE Does this happen every time? Yes. Other information:
I don't reproduce this here. Can you provide a testcase that shows the behaviour ?
Created attachment 62432 [details] Program to demonstrate the issue I have attached a simple program to demonstrate the problem. to run without setting the size, pass 1 parameter (the file name): ./program file.gif to run and set the size, pass 2 parameters: ./program file.gif set_size Here is the output I get when I run this test: $ ./program byzanz-demo.gif ** Message: Animation is not a static image $ ./program byzanz-demo.gif set_size ** Message: calling gdk_pixbuf_loader_set_size ** Message: Animation is a static image You can see that when gdk_pixbuf_loader_set_size is called, the animation is static.
Fixed in trunk: 2007-03-08 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-scaled-anim.[hc]: Implement an animation wrapper for scaling animations. * gdk-pixbuf-loader.c: Use GdkPixbufScaledAnim to scale animations. (#335752, Mike Morrison) * Makefile.am: Glue.