diff options
author | Yotam Barnoy | 2010-10-29 07:08:24 +0000 |
---|---|---|
committer | Yotam Barnoy | 2010-10-29 07:08:24 +0000 |
commit | 082d9a446571ae034d4deaeb81c0affde450224d (patch) | |
tree | b02b4d7db93516ea9ddc2e63f8a9cb0e238225ae /backends/platform/psp/png_loader.h | |
parent | 62c5f4f8e5bc7595d2eea735f38b8eb427b4dd7d (diff) | |
download | scummvm-rg350-082d9a446571ae034d4deaeb81c0affde450224d.tar.gz scummvm-rg350-082d9a446571ae034d4deaeb81c0affde450224d.tar.bz2 scummvm-rg350-082d9a446571ae034d4deaeb81c0affde450224d.zip |
PSP: corrected png loader to use bit depth rather than palette size
Sometimes we can have an 8bit file for example that has a palette of 16 colors or less, so we need to go by the bit depth rather than inferring the bit depth from the palette size.
svn-id: r53917
Diffstat (limited to 'backends/platform/psp/png_loader.h')
-rw-r--r-- | backends/platform/psp/png_loader.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/backends/platform/psp/png_loader.h b/backends/platform/psp/png_loader.h index 6b0282621a..4119bfef2b 100644 --- a/backends/platform/psp/png_loader.h +++ b/backends/platform/psp/png_loader.h @@ -44,11 +44,14 @@ private: uint32 _width; uint32 _height; uint32 _paletteSize; - int _bitDepth; Buffer::HowToSize _sizeBy; + + // PNG lib values + int _bitDepth; png_structp _pngPtr; png_infop _infoPtr; int _colorType; + uint32 _channels; public: enum Status { @@ -61,7 +64,8 @@ public: Buffer::HowToSize sizeBy = Buffer::kSizeByTextureSize) : _file(file), _buffer(&buffer), _palette(&palette), _width(0), _height(0), _paletteSize(0), - _bitDepth(0), _sizeBy(sizeBy), _pngPtr(0), _infoPtr(0), _colorType(0) {} + _bitDepth(0), _sizeBy(sizeBy), _pngPtr(0), + _infoPtr(0), _colorType(0), _channels(0) {} PngLoader::Status allocate(); bool load(); |