From 9867e000a9f3b447ffb22f23e29e92135567ccad Mon Sep 17 00:00:00 2001 From: Emily Blunts Date: Wed, 15 Jun 2022 23:23:23 -0700 Subject: [PATCH] Update to scripts --- scripts/User/ReadMe.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/User/ReadMe.md b/scripts/User/ReadMe.md index 499ec094f7a..2c8cbf86bc3 100644 --- a/scripts/User/ReadMe.md +++ b/scripts/User/ReadMe.md @@ -38,7 +38,21 @@ That's it. # iconencode Compress an icon asset from an XBM to a compressed char array ready to paste Will assume dimensions of 128x64 -There is a small header on these I haven't determined the format of, so this won't work as is yet. +Header works like this, you'll have to do this manually for now! + +Image Header Format Example +0x01 = Compressed +0x00 = Reserved Section +0xa4,0x01 = 0x1a4, or, 420 - the size of the compressed array, minus this header. Just count the commas ;) +Rest of the data is char array output from heatshrink of the original XBM char array. +Calculated Header: 0x01,0x00,0xa4,0x01 +from furi_hal_compress.c: +typedef struct { + uint8_t is_compressed; + uint8_t reserved; + uint16_t compressed_buff_size; +} FuriHalCompressHeader; + ## # icondecode