Well, here is several methods of compression images and several types (8 bits per pixel, 16 bits per pixel). 8 bpp is palette oriented images, but 16 bpp (used in A7, for example in SJ5000+) do not use palette.
I while not work with 8 bpp images, but i was able to decode 16 bpp images with compression method 3.
This si bitmaps.bin from Xiaomi Yi with 8 bpp images and compression method "0":
![132.JPG 132.JPG](https://dashcamtalk.com/forum/data/attachments/15/15474-1f22099799c0bd244787357ad4c34d8e.jpg?hash=HyIJl5nAvS)
As you see i not decode colors correctly.
This is bitmaps.bin form SJ5000+ with 16 bpp images:
![135.JPG 135.JPG](https://dashcamtalk.com/forum/data/attachments/15/15475-507e9fb8835e3967296c05d14ba312c9.jpg?hash=UH6fuINeOW)
Here colors is decoded correctly. Note the compression method - here it is "3", not "0".
And there are the multi-frame images:
In general, I decided all the problems with compression.
May be you try apply palette to 16 bpp images, that do not need it?
В двух словах: я не занимался плотно 8-битными изображениями, меня интересовали 16-битные, с ними у меня и были проблемы сжатия. При этом моя же программа после сжатия читала их корректно, а камера сходила с ума. Сжатие 8-битных и 16-битных изображений отличаются, кстати. Кроме того, в 16-битных палитра не применяется, там цвет закодирован непосредственно.
А еще бывают многокадровые изображения. Принцип их упаковки я понял, но пока не стал возиться с их декодированием и выводом на экран.
В принципе, я свои проблемы со сжатием порешал, все работает
![Smile :) :)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png)