Add support for rgba4, rgb5a1, rgb565, and rgb10a2 ImageData formats. Also fix normalized 8 and 16 bit per component ImageData to round instead of floor (post-converted fixed point) fractional values in setPixel and mapPixel.

This commit is contained in:
Alex Szpakowski
2019-09-21 11:02:40 -03:00
parent f03b391245
commit 94c66918a8
4 changed files with 215 additions and 19 deletions
+3
View File
@@ -44,6 +44,8 @@ union Pixel
uint16 rgba16[4];
half rgba16f[4];
float rgba32f[4];
uint16 packed16;
uint32 packed32;
};
/**
@@ -114,6 +116,7 @@ public:
size_t getPixelSize() const;
static bool validPixelFormat(PixelFormat format);
static bool canPaste(PixelFormat src, PixelFormat dst);
static bool getConstant(const char *in, FormatHandler::EncodedFormat &out);
static bool getConstant(FormatHandler::EncodedFormat in, const char *&out);