https://github.com/BestImageViewer/geeqie/issues/813
If the file extension is .gif, 2pass is set to FALSE, and interpolation
is set to nearest.
pr = PIXBUF_RENDERER(imd->pr);
pr->zoom = zoom; /* store the zoom, needed by the loader */
pr = PIXBUF_RENDERER(imd->pr);
pr->zoom = zoom; /* store the zoom, needed by the loader */
+ /* Disable 2-pass for GIFs. Animated GIFs can flicker when enabled
+ * Reduce quality to worst but fastest to avoid dropped frames */
+ if (g_ascii_strcasecmp(imd->image_fd->extension, ".GIF") == 0)
+ {
+ g_object_set(G_OBJECT(imd->pr), "zoom_2pass", FALSE, NULL);
+ g_object_set(G_OBJECT(imd->pr), "zoom_quality", GDK_INTERP_NEAREST, NULL);
+ }
+
+
if (image_load_begin(imd, imd->image_fd))
{
imd->unknown = FALSE;
if (image_load_begin(imd, imd->image_fd))
{
imd->unknown = FALSE;