Use file extension as fallback.
authorDirk Lemstra <dirk@git.imagemagick.org>
Sat, 7 Apr 2018 16:51:17 +0000 (18:51 +0200)
committerDirk Lemstra <dirk@git.imagemagick.org>
Sat, 7 Apr 2018 16:58:04 +0000 (18:58 +0200)
Magick++/fuzz/encoder_format.h

index 0aa9cb26d6134a9fee7b3ea084cbc66e6d16be20..c8ab9828435b3f770511a6296528c4b8415e36ed 100644 (file)
@@ -20,6 +20,8 @@ public:
     index = format.find(L"_", 0);
     if (index != std::wstring::npos)
       _format=format.substr(0, index);
+    else if (extension.length() > 1)
+      _format=extension.substr(1, extension.size() - 1);
   }
 private:
   std::wstring _format = L".notset";