After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 335752 - Loading GIF Animation with GdkPixbufLoader returns static image if "gdk_pixbuf_loader_set_size" is called in "size-prepared" signal handler
Loading GIF Animation with GdkPixbufLoader returns static image if "gdk_pixbu...
Status: RESOLVED FIXED
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-03-23 21:27 UTC by mike morrison
Modified: 2010-07-10 04:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Program to demonstrate the issue (6.29 KB, application/x-tar)
2006-03-31 03:03 UTC, mike morrison
Details

Description mike morrison 2006-03-23 21:27:42 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:
Comment 1 Matthias Clasen 2006-03-30 18:19:34 UTC
I don't reproduce this here. 
Can you provide a testcase that shows the behaviour ?
Comment 2 mike morrison 2006-03-31 03:03:09 UTC
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.
Comment 3 Matthias Clasen 2007-03-08 16:25:11 UTC
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.