fix(script): update RLE compressed image raw len without padding
On device, the decompress could ignore the padding bytes, thus we should store only the raw image data length as decompressed data length in image file. Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
committed by
Gabor Kiss-Vamosi
parent
3109c09339
commit
dd70291e4c
@@ -470,7 +470,6 @@ 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)
|
||||
self.raw_data_len += len(pad)
|
||||
compressed = RLEImage().rle_compress(raw_data + pad, self.blk_size)
|
||||
elif self.compress == CompressMethod.LZ4:
|
||||
compressed = lz4.block.compress(raw_data, store_size=False)
|
||||
|
||||
Reference in New Issue
Block a user