From dffb6b496bb8c62e306ff5b5698d651265f711af Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Tue, 20 Apr 2021 14:32:25 +0200 Subject: [PATCH] Ensure GIF input will work with future libvips v8.11.0 --- src/api/utils/utility.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/utils/utility.h b/src/api/utils/utility.h index 8ec39fb9..5bc96da0 100644 --- a/src/api/utils/utility.h +++ b/src/api/utils/utility.h @@ -240,7 +240,8 @@ inline ImageType determine_image_type(const std::string &loader) { return ImageType::Webp; } else if (loader.rfind("VipsForeignLoadTiff", 0) == 0) { return ImageType::Tiff; - } else if (loader.rfind("VipsForeignLoadGif", 0) == 0) { + } else if (loader.rfind("VipsForeignLoadGif", 0) == 0 || + loader.rfind("VipsForeignLoadNsgif", 0) == 0) { return ImageType::Gif; } else if (loader.rfind("VipsForeignLoadSvg", 0) == 0) { return ImageType::Svg; @@ -264,6 +265,7 @@ inline ImageType determine_image_type(const std::string &loader) { inline bool image_loader_supports_page(const std::string &loader) { return loader.rfind("VipsForeignLoadPdf", 0) == 0 || loader.rfind("VipsForeignLoadGif", 0) == 0 || + loader.rfind("VipsForeignLoadNsgif", 0) == 0 || loader.rfind("VipsForeignLoadTiff", 0) == 0 || loader.rfind("VipsForeignLoadWebp", 0) == 0 || loader.rfind("VipsForeignLoadHeif", 0) == 0 ||