1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

fix(script): do not add pad if 'araw_data_len' can divide 'bblk_size' evenly. (#7109)

Signed-off-by: wxd <xaowang96@gmail.com>
This commit is contained in:
xaowang 2024-10-24 17:14:54 +08:00 committed by GitHub
parent de464daef5
commit 7f690a2f22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -469,7 +469,9 @@ class LVGLCompressData:
if self.compress == CompressMethod.RLE:
# RLE compression performs on pixel unit, pad data to pixel unit
pad = b'\x00' * (self.blk_size - self.raw_data_len % self.blk_size)
pad = b'\x00' * 0
if self.raw_data_len % self.blk_size:
pad = b'\x00' * (self.blk_size - self.raw_data_len % self.blk_size)
compressed = RLEImage().rle_compress(raw_data + pad, self.blk_size)
elif self.compress == CompressMethod.LZ4:
compressed = lz4.block.compress(raw_data, store_size=False)