fxconv: fix double object file size for RGB565 images

This commit is contained in:
Lephenixnoir 2022-07-16 17:23:14 +01:00
parent 00b85297a3
commit a7046966da
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495

View file

@ -1033,7 +1033,7 @@ def image_encode(img, format):
if format.depth == IMAGE_RGB16:
# Preserve alignment between rows by padding to 4 bytes
stride = (img.width + 1) // 2 * 4
size = stride * img.height * 2
size = stride * img.height
elif format.depth == IMAGE_P8:
size = img.width * img.height
stride = img.width