Add support for loading DDS files that contain raw/uncompressed pixel data. Resolves issue #1097.

This commit is contained in:
Alex Szpakowski
2019-09-17 22:40:11 -03:00
parent a6f8e7dac6
commit d6e37ec4aa
5 changed files with 578 additions and 200 deletions
+2 -8
View File
@@ -23,9 +23,6 @@
// LOVE
#include "image/FormatHandler.h"
// dds parser
#include "ddsparse/ddsparse.h"
// STL
#include <string>
@@ -46,16 +43,13 @@ public:
virtual ~DDSHandler() {}
// Implements FormatHandler.
bool canDecode(Data *data) override;
DecodedImage decode(Data *data) override;
bool canParseCompressed(Data *data) override;
StrongRef<CompressedMemory> parseCompressed(Data *filedata,
std::vector<StrongRef<CompressedSlice>> &images,
PixelFormat &format, bool &sRGB) override;
private:
static PixelFormat convertFormat(dds::Format ddsformat, bool &sRGB);
}; // DDSHandler
} // magpie