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 755672 - Fix thumbnailing GIF animations
Fix thumbnailing GIF animations
Status: RESOLVED FIXED
Product: gdk-pixbuf
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
: 741310 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-09-26 17:53 UTC by Bastien Nocera
Modified: 2015-10-05 12:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: Add test case for thumbnailing failure (318.72 KB, patch)
2015-09-26 17:53 UTC, Bastien Nocera
none Details | Review
gif: Fix thumbnailing GIF animations (1.22 KB, patch)
2015-09-26 17:53 UTC, Bastien Nocera
none Details | Review
gif: Fix thumbnailing GIF animations (2.97 KB, patch)
2015-10-02 13:10 UTC, Bastien Nocera
committed Details | Review
tests: Add test case for thumbnailing failure (319.03 KB, patch)
2015-10-02 13:10 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2015-09-26 17:53:17 UTC
With a test case.
Comment 1 Bastien Nocera 2015-09-26 17:53:24 UTC
Created attachment 312209 [details] [review]
tests: Add test case for thumbnailing failure

Add a test case that replicates gnome-desktop's thumbnailing. The
important thing here is to only load until we have a first frame, and
close the GIF loader.

Test file by Rebecca Mock from:
http://www.wired.com/2013/09/the-rise-of-subtle-tasteful-and-commissioned-animated-gif-illustrations/
Comment 2 Bastien Nocera 2015-09-26 17:53:30 UTC
Created attachment 312210 [details] [review]
gif: Fix thumbnailing GIF animations

When using progressive loading, the GIF loader seems to expect us to
load every single frame of the image before being "done". That's really
not the case when thumbnailing, as we only want the first frame in that
case.

Don't fail to close the loader even if we only have one frame loaded.
Comment 3 Bastien Nocera 2015-09-26 17:54:40 UTC
*** Bug 741310 has been marked as a duplicate of this bug. ***
Comment 4 Matthias Clasen 2015-10-02 12:14:04 UTC
Review of attachment 312209 [details] [review]:

looks good
Comment 5 Matthias Clasen 2015-10-02 12:19:14 UTC
Review of attachment 312210 [details] [review]:

Hmm. I might suggest to add a GDK_PIXBUF_INCOMPLETE_IMAGE, use that error for this case and ignore it in the thumbnailer.
Comment 6 Bastien Nocera 2015-10-02 13:10:25 UTC
Created attachment 312562 [details] [review]
gif: Fix thumbnailing GIF animations

When using progressive loading, the GIF loader seems to expect us to
load every single frame of the image before being "done". That's really
not the case when thumbnailing, as we only want the first frame in that
case.

Return the GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION error when not all the
frames have been decoded, so that users of the API can ignore it, like
gnome-desktop's thumbnailer.
Comment 7 Bastien Nocera 2015-10-02 13:10:39 UTC
Created attachment 312563 [details] [review]
tests: Add test case for thumbnailing failure

Add a test case that replicates gnome-desktop's thumbnailing. The
important thing here is to only load until we have a first frame, and
close the GIF loader.

Test file by Rebecca Mock from:
http://www.wired.com/2013/09/the-rise-of-subtle-tasteful-and-commissioned-animated-gif-illustrations/
Comment 8 Bastien Nocera 2015-10-02 13:13:43 UTC
See https://bugzilla.gnome.org/show_bug.cgi?id=755982 for the gnome-desktop bug.

Will need to branch/bump version as well.
Comment 9 Matthias Clasen 2015-10-03 04:34:22 UTC
Review of attachment 312562 [details] [review]:

looks good
Comment 10 Matthias Clasen 2015-10-03 04:35:00 UTC
Review of attachment 312563 [details] [review]:

ok
Comment 11 Bastien Nocera 2015-10-05 12:08:18 UTC
Attachment 312562 [details] pushed as 04c0202 - gif: Fix thumbnailing GIF animations
Attachment 312563 [details] pushed as 744e213 - tests: Add test case for thumbnailing failure