From 811a3b6a382ae1676aa4556ee9268b7658ee7b37 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Thu, 18 Jan 2018 21:57:03 +0100 Subject: [PATCH] Only use the module name for the encoder list and added list for a few exceptions. --- Magick++/fuzz/encoder_list.cc | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/Magick++/fuzz/encoder_list.cc b/Magick++/fuzz/encoder_list.cc index de58f997c..517a8dbd9 100644 --- a/Magick++/fuzz/encoder_list.cc +++ b/Magick++/fuzz/encoder_list.cc @@ -1,5 +1,6 @@ #include #include +#include #include #include @@ -8,8 +9,35 @@ int main() { std::list coderList; coderInfoList(&coderList, Magick::CoderInfo::TrueMatch, Magick::CoderInfo::AnyMatch, Magick::CoderInfo::AnyMatch); + std::list allowedNames; + allowedNames.push_back("BGR"); + allowedNames.push_back("BMP"); + allowedNames.push_back("CMYK"); + allowedNames.push_back("DDS"); + allowedNames.push_back("EPT"); + allowedNames.push_back("FAX"); + allowedNames.push_back("GRADIENT"); + allowedNames.push_back("HTML"); + allowedNames.push_back("JP2"); + allowedNames.push_back("JPEG"); + allowedNames.push_back("PCD"); + allowedNames.push_back("PCD"); + allowedNames.push_back("PDF"); + allowedNames.push_back("PNG"); + allowedNames.push_back("PS"); + allowedNames.push_back("PS2"); + allowedNames.push_back("PS3"); + allowedNames.push_back("RGB"); + allowedNames.push_back("SVG"); + allowedNames.push_back("TIFF"); + allowedNames.push_back("TXT"); + allowedNames.push_back("YCBCR"); + for (std::list::iterator it = coderList.begin(); it != coderList.end(); it++) { - std::cout << ((*it).isWritable() ? "+" : "-") << (*it).name() << std::endl; + if ((*it).name() == (*it).module()) + std::cout << ((*it).isWritable() ? "+" : "-") << (*it).module() << std::endl; + else if (std::find(allowedNames.begin(), allowedNames.end(), (*it).module()) != allowedNames.end()) + std::cout << ((*it).isWritable() ? "+" : "-") << (*it).name() << std::endl; } } -- 2.40.0