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::AbstractImporter::Features,
@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
next to file type detection based on filename
- @ref Trade::AnyImageConverter "AnyImageConverter" learned detection of JPEG
output
@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";
else if(Utility::String::endsWith(filename, ".hdr"))
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"))
plugin = "PngImageConverter";
else if(Utility::String::endsWith(filename, ".tga") ||

2
src/MagnumPlugins/AnyImageConverter/AnyImageConverter.h

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

Loading…
Cancel
Save