Skip to content

Commit

Permalink
Ensure GIF input will work with future libvips v8.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Apr 20, 2021
1 parent 0fd8fa5 commit dffb6b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/api/utils/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 ||
Expand Down

0 comments on commit dffb6b4

Please sign in to comment.