From 841bcc84ab3631a4f22bff40dd4a26be58468ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 Jan 2015 21:30:05 +0100 Subject: [PATCH] AnyImageImporter: recognize PGM and PPM formats. Newly supported by StbImageImporter. --- src/MagnumPlugins/AnyImageImporter/AnyImageImporter.cpp | 4 ++++ src/MagnumPlugins/AnyImageImporter/AnyImageImporter.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/MagnumPlugins/AnyImageImporter/AnyImageImporter.cpp b/src/MagnumPlugins/AnyImageImporter/AnyImageImporter.cpp index 31a06928c..eb9935ae1 100644 --- a/src/MagnumPlugins/AnyImageImporter/AnyImageImporter.cpp +++ b/src/MagnumPlugins/AnyImageImporter/AnyImageImporter.cpp @@ -60,10 +60,14 @@ void AnyImageImporter::doOpenFile(const std::string& filename) { plugin = "HdrImporter"; else if(Utility::String::endsWith(filename, ".jpg") || Utility::String::endsWith(filename, ".jpeg")) plugin = "JpegImporter"; + else if(Utility::String::endsWith(filename, ".pgm")) + plugin = "PgmImporter"; else if(Utility::String::endsWith(filename, ".pic")) plugin = "PicImporter"; else if(Utility::String::endsWith(filename, ".png")) plugin = "PngImporter"; + else if(Utility::String::endsWith(filename, ".ppm")) + plugin = "PpmImporter"; else if(Utility::String::endsWith(filename, ".psd")) plugin = "PsdImporter"; else if(Utility::String::endsWith(filename, ".tga")) diff --git a/src/MagnumPlugins/AnyImageImporter/AnyImageImporter.h b/src/MagnumPlugins/AnyImageImporter/AnyImageImporter.h index 3a6953b26..a248d55fd 100644 --- a/src/MagnumPlugins/AnyImageImporter/AnyImageImporter.h +++ b/src/MagnumPlugins/AnyImageImporter/AnyImageImporter.h @@ -54,8 +54,10 @@ tries to open the file with it. Supported formats: - JPEG (`*.jpg`, `*.jpeg`), loaded with @ref JpegImporter or any other plugin that provides it - PIC (`*.pic`), loaded with any plugin that provides `PicImporter` +- PGM (`*.pgm`), loaded with any plugin that provides `PgmImporter` - PNG (`*.png`), loaded with @ref PngImporter or any other plugin that provides it +- PPM (`*.ppm`), loaded with any plugin that provides `PpmImporter` - PSD (`*.psd`), loaded with any plugin that provides `PsdImporter` - TGA (`*.tga`), loaded with @ref TgaImporter or any other plugin that provides it