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 735422 - gdk_pixbuf_new_from_file_at_scale is broken for animated GIFs
gdk_pixbuf_new_from_file_at_scale is broken for animated GIFs
Status: RESOLVED OBSOLETE
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on: 739202
Blocks:
 
 
Reported: 2014-08-26 01:45 UTC by Will Greenberg
Modified: 2018-05-22 13:16 UTC
See Also:
GNOME target: ---
GNOME version: 2.31/2.32



Description Will Greenberg 2014-08-26 01:45:01 UTC
If an animated gif is loaded via gdk_pixbuf_new_from_file_at_scale, GdkPixbuf throws "GIF image was truncated or incomplete".

This happens seemingly independent of the scale provided, and would appear to be because the GdkPixbufLoader for the gif is being closed before the gif has been fully read (i.e. its state is GIF_LZW_FILL_BUFFER at Loader closing time). Perhaps the check for an existing animation at gdk-pixbuf/gdk-pixbuf-io.c:L1361 isn't a reliable tell for when the image is ready to be closed?

Here's a tiny script to reproduce. Sample image is SFW adorable cat gif:
curl http://i.imgur.com/psu515W.gif -o catbee.gif
gjs -c "imports.gi.GdkPixbuf.Pixbuf.new_from_file_at_scale('catbee.gif', -1, -1, true);"
Comment 1 Bastien Nocera 2014-10-22 17:50:54 UTC
Reproduced with gdk-pixbuf 2.31.
Comment 2 GNOME Infrastructure Team 2018-05-22 13:16:36 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues/45.