ImageData supports more formats: r8, rg8, r16, rg16, r16f, rg16f, r32f, rg32f. Format conversion via ImageData:paste is not supported for those (yet).

This commit is contained in:
Alex Szpakowski
2019-04-28 12:09:16 -03:00
parent 8b51dc831d
commit 372a55c6ac
4 changed files with 348 additions and 140 deletions
-24
View File
@@ -121,14 +121,6 @@ public:
private:
union Row
{
uint8 *u8;
uint16 *u16;
half *f16;
float *f32;
};
// Create imagedata. Initialize with data if not null.
void create(int width, int height, PixelFormat format, void *data = nullptr);
@@ -144,22 +136,6 @@ private:
// this so we can properly delete memory allocated by the decoder.
StrongRef<FormatHandler> decodeHandler;
static void pasteRGBA8toRGBA16(Row src, Row dst, int w);
static void pasteRGBA8toRGBA16F(Row src, Row dst, int w);
static void pasteRGBA8toRGBA32F(Row src, Row dst, int w);
static void pasteRGBA16toRGBA8(Row src, Row dst, int w);
static void pasteRGBA16toRGBA16F(Row src, Row dst, int w);
static void pasteRGBA16toRGBA32F(Row src, Row dst, int w);
static void pasteRGBA16FtoRGBA8(Row src, Row dst, int w);
static void pasteRGBA16FtoRGBA16(Row src, Row dst, int w);
static void pasteRGBA16FtoRGBA32F(Row src, Row dst, int w);
static void pasteRGBA32FtoRGBA8(Row src, Row dst, int w);
static void pasteRGBA32FtoRGBA16(Row src, Row dst, int w);
static void pasteRGBA32FtoRGBA16F(Row src, Row dst, int w);
static StringMap<FormatHandler::EncodedFormat, FormatHandler::ENCODED_MAX_ENUM>::Entry encodedFormatEntries[];
static StringMap<FormatHandler::EncodedFormat, FormatHandler::ENCODED_MAX_ENUM> encodedFormats;