diff --git a/src/MagnumPlugins/AnyImageConverter/AnyImageConverter.cpp b/src/MagnumPlugins/AnyImageConverter/AnyImageConverter.cpp index 0f16b87eb..b68381258 100644 --- a/src/MagnumPlugins/AnyImageConverter/AnyImageConverter.cpp +++ b/src/MagnumPlugins/AnyImageConverter/AnyImageConverter.cpp @@ -92,6 +92,8 @@ bool AnyImageConverter::doConvertToFile(const ImageView2D& image, const Containe normalized.hasSuffix(".jpeg"_s) || normalized.hasSuffix(".jpe"_s)) plugin = "JpegImageConverter"_s; + else if(normalized.hasSuffix(".ktx2"_s)) + plugin = "KtxImageConverter"_s; else if(normalized.hasSuffix(".png"_s)) plugin = "PngImageConverter"_s; else if(normalized.hasSuffix(".tga"_s) || diff --git a/src/MagnumPlugins/AnyImageConverter/AnyImageConverter.h b/src/MagnumPlugins/AnyImageConverter/AnyImageConverter.h index 21fa44fac..715997a5f 100644 --- a/src/MagnumPlugins/AnyImageConverter/AnyImageConverter.h +++ b/src/MagnumPlugins/AnyImageConverter/AnyImageConverter.h @@ -66,6 +66,8 @@ tries to convert the file with it. Supported formats for uncompressed data: `HdrImageConverter` - JPEG (`*.jpg`, `*.jpe`, `*.jpeg`), converted with @ref JpegImageConverter or any other plugin that provides it +- KTX2 (`*.ktx2`), converted with any plugin that provides + `KtxImageConverter` - Portable Network Graphics (`*.png`), converted with @ref PngImageConverter or any other plugin that provides it - Truevision TGA (`*.tga`, `*.vda`, `*.icb`, `*.vst`), converted with diff --git a/src/MagnumPlugins/AnyImageConverter/Test/AnyImageConverterTest.cpp b/src/MagnumPlugins/AnyImageConverter/Test/AnyImageConverterTest.cpp index d9ccaafba..0d93c44a5 100644 --- a/src/MagnumPlugins/AnyImageConverter/Test/AnyImageConverterTest.cpp +++ b/src/MagnumPlugins/AnyImageConverter/Test/AnyImageConverterTest.cpp @@ -153,6 +153,7 @@ constexpr struct { {"JPEG", "file.jpg", "JpegImageConverter"}, {"JPEG weird extension", "file.jpe", "JpegImageConverter"}, {"JPEG uppercase", "output.JPG", "JpegImageConverter"}, + {"KTX2", "foo.ktx2", "KtxImageConverter"}, {"PNG", "file.png", "PngImageConverter"} };