From: Colin Clark Date: Sun, 22 Aug 2021 13:31:03 +0000 (+0100) Subject: Fix #813: Animated GIF should use faster antialiasing (or none at all) X-Git-Tag: v1.7~71 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=451e12690e443bd74a5ce9a597f344e14ef40089 Fix #813: Animated GIF should use faster antialiasing (or none at all) https://github.com/BestImageViewer/geeqie/issues/813 If the file extension is .gif, 2pass is set to FALSE, and interpolation is set to nearest. --- diff --git a/src/image.c b/src/image.c index c81b1c50..889f241e 100644 --- a/src/image.c +++ b/src/image.c @@ -1095,6 +1095,15 @@ static void image_change_complete(ImageWindow *imd, gdouble zoom) 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;