GNOME Bugzilla – Bug 755672
Fix thumbnailing GIF animations
Last modified: 2015-10-05 12:08:27 UTC
With a test case.
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/
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.
*** Bug 741310 has been marked as a duplicate of this bug. ***
Review of attachment 312209 [details] [review]: looks good
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.
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.
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/
See https://bugzilla.gnome.org/show_bug.cgi?id=755982 for the gnome-desktop bug. Will need to branch/bump version as well.
Review of attachment 312562 [details] [review]: looks good
Review of attachment 312563 [details] [review]: ok
Attachment 312562 [details] pushed as 04c0202 - gif: Fix thumbnailing GIF animations Attachment 312563 [details] pushed as 744e213 - tests: Add test case for thumbnailing failure