mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-21 19:51:49 +00:00
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.
This commit is contained in:
parent
c847476a93
commit
773295842a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user