Fixed image size calculation.

This commit is contained in:
Branimir Karadžić
2017-10-24 17:32:01 -07:00
parent 2e9447f4c4
commit 5baa2c36b8

View File

@@ -288,7 +288,7 @@ namespace bimg
height = bx::uint32_max(blockHeight * minBlockY, ( (height + blockHeight - 1) / blockHeight)*blockHeight);
depth = bx::uint32_max(1, depth);
size += width*height*depth*bpp/8 * sides;
size += uint32_t(uint64_t(width*height*depth)*bpp/8 * sides);
width >>= 1;
height >>= 1;