Browse Source

AnyImageConverter: detect JPEG output as well.

pull/272/head
Vladimír Vondruš 8 years ago
parent
commit
c60217a6bc
  1. 4
      doc/changelog.dox
  2. 4
      src/MagnumPlugins/AnyImageConverter/AnyImageConverter.cpp
  3. 2
      src/MagnumPlugins/AnyImageConverter/AnyImageConverter.h

4
doc/changelog.dox

@ -106,9 +106,11 @@ See also:
@ref Trade::AbstractImageConverter::Feature enums and @ref Trade::AbstractImageConverter::Feature enums and
@ref Trade::AbstractImporter::Features, @ref Trade::AbstractImporter::Features,
@ref Trade::AbstractImageConverter::Features enum sets @ref Trade::AbstractImageConverter::Features enum sets
@ref Trade::AnyImageImporter "AnyImageImporter" plugin now supports - @ref Trade::AnyImageImporter "AnyImageImporter" plugin now supports
detection and loading of DDS, EXR, HDR, JPEG, PNG and TGA files from data detection and loading of DDS, EXR, HDR, JPEG, PNG and TGA files from data
next to file type detection based on filename next to file type detection based on filename
- @ref Trade::AnyImageConverter "AnyImageConverter" learned detection of JPEG
output
@subsection changelog-latest-changes Changes and improvements @subsection changelog-latest-changes Changes and improvements

4
src/MagnumPlugins/AnyImageConverter/AnyImageConverter.cpp

@ -53,6 +53,10 @@ bool AnyImageConverter::doExportToFile(const ImageView2D& image, const std::stri
plugin = "OpenExrImageConverter"; plugin = "OpenExrImageConverter";
else if(Utility::String::endsWith(filename, ".hdr")) else if(Utility::String::endsWith(filename, ".hdr"))
plugin = "HdrImageConverter"; plugin = "HdrImageConverter";
else if(Utility::String::endsWith(filename, ".jpg") ||
Utility::String::endsWith(filename, ".jpeg") ||
Utility::String::endsWith(filename, ".jpe"))
plugin = "JpegImageConverter";
else if(Utility::String::endsWith(filename, ".png")) else if(Utility::String::endsWith(filename, ".png"))
plugin = "PngImageConverter"; plugin = "PngImageConverter";
else if(Utility::String::endsWith(filename, ".tga") || else if(Utility::String::endsWith(filename, ".tga") ||

2
src/MagnumPlugins/AnyImageConverter/AnyImageConverter.h

@ -73,6 +73,8 @@ Supported formats for uncompressed data:
`BmpImageConverter` `BmpImageConverter`
- Radiance HDR (`*.hdr`), converted with any plugin that provides - Radiance HDR (`*.hdr`), converted with any plugin that provides
`HdrImageConverter` `HdrImageConverter`
- JPEG (`*.jpg`, `*.jpe`, `*.jpeg`), converted with @ref JpegImageConverter
or any other plugin that provides it
- Portable Network Graphics (`*.png`), converted with @ref PngImageConverter - Portable Network Graphics (`*.png`), converted with @ref PngImageConverter
or any other plugin that provides it or any other plugin that provides it
- Truevision TGA (`*.tga`, `*.vda`, `*.icb`, `*.vst`), converted with - Truevision TGA (`*.tga`, `*.vda`, `*.icb`, `*.vst`), converted with

Loading…
Cancel
Save