Fix bmp file and bitmap size are incorrectly set during save command (fix #3534)

Before this fix, file and image sizes were calculated incorrectly. This caused problems for some viewers/browsers/engines to load BMPs created in Aseprite.
This commit is contained in:
Gaspar Capello 2022-09-23 18:07:23 -03:00
parent 877ae9eeec
commit 59fff4ba9c

View File

@ -1213,7 +1213,7 @@ bool BmpFormat::onSave(FileOp *fop)
+ biSizeImage); // image data
}
else {
biSizeImage = (w*3 + filler) * h;
biSizeImage = (w*bpp/8 + filler) * h;
if (withAlpha)
bfSize = BV3INFOHEADERSIZE +
OS2FILEHEADERSIZE + biSizeImage; // header + image data