Skip to content

Commit

Permalink
IMAGE: Correct 4-byte image writting pixel format
Browse files Browse the repository at this point in the history
  • Loading branch information
yinsimei committed Aug 3, 2017
1 parent 3a7e5f1 commit a503af4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion image/png.cpp
Expand Up @@ -250,7 +250,7 @@ bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) {
bool writePNG(Common::WriteStream &out, const Graphics::Surface &input, const bool bottomUp) { bool writePNG(Common::WriteStream &out, const Graphics::Surface &input, const bool bottomUp) {
#ifdef USE_PNG #ifdef USE_PNG
const Graphics::PixelFormat requiredFormat_3byte(3, 8, 8, 8, 0, 16, 8, 0, 0); const Graphics::PixelFormat requiredFormat_3byte(3, 8, 8, 8, 0, 16, 8, 0, 0);
const Graphics::PixelFormat requiredFormat_4byte(4, 8, 8, 8, 8, 16, 8, 0, 24); const Graphics::PixelFormat requiredFormat_4byte(4, 8, 8, 8, 8, 0, 8, 16, 24);


if (input.format.bytesPerPixel == 3) { if (input.format.bytesPerPixel == 3) {
if (input.format != requiredFormat_3byte) { if (input.format != requiredFormat_3byte) {
Expand Down

0 comments on commit a503af4

Please sign in to comment.