diff options
author | Cameron Cawley | 2019-11-10 12:40:44 +0000 |
---|---|---|
committer | GitHub | 2019-11-10 12:40:44 +0000 |
commit | 773295842ac5cae66da0361d6c4914faee80fb00 (patch) | |
tree | 16b4bee4bbf73a54fba3ddcb3db204451e568fc4 | |
parent | c847476a932ed6798444e275232b38a3b6048286 (diff) | |
download | scummvm-rg350-773295842ac5cae66da0361d6c4914faee80fb00.tar.gz scummvm-rg350-773295842ac5cae66da0361d6c4914faee80fb00.tar.bz2 scummvm-rg350-773295842ac5cae66da0361d6c4914faee80fb00.zip |
IMAGE: Remove unnecessary check from Image::writePNG()
Surfaces with pixel formats not supported by libpng are already converted to RGBA, meaning that the check isn't needed.
-rw-r--r-- | image/png.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/image/png.cpp b/image/png.cpp index e854651da6..9532840f2f 100644 --- a/image/png.cpp +++ b/image/png.cpp @@ -265,16 +265,6 @@ bool writePNG(Common::WriteStream &out, const Graphics::Surface &input, const bo const Graphics::PixelFormat requiredFormat_4byte(4, 8, 8, 8, 8, 24, 16, 8, 0); #endif - if (input.format.bytesPerPixel == 3) { - if (input.format != requiredFormat_3byte) { - warning("Cannot currently write PNG with 3-byte pixel format other than %s", requiredFormat_3byte.toString().c_str()); - return false; - } - } else if (input.format.bytesPerPixel != 4) { - warning("Cannot currently write PNG with pixel format of bpp other than 3, 4"); - return false; - } - int colorType; Graphics::Surface *tmp = NULL; const Graphics::Surface *surface; |