TGA: memory optimizations and native grayscale support

- Removed temporary buffer of uncompressed image size when reading (loads images using half the memory)
- Added native support for Grayscale images (they are no longer converted to RGB(A) 32 when reading/writing)
- Fixes wrong X channel value on RGBX32 images (CCBUG: 499584)

It should also reduce loading times for corrupted images.

Closes #33
This commit is contained in:
Mirco Miranda
2025-08-20 23:53:00 +02:00
committed by Albert Astals Cid
parent bc8b5b56b1
commit ebc366b3c5
4 changed files with 173 additions and 118 deletions

View File

@ -29,6 +29,8 @@ public:
private:
bool writeIndexed(const QImage &image);
bool writeGrayscale(const QImage &image);
bool writeRGBA(const QImage &image);
const QScopedPointer<TGAHandlerPrivate> d;