Android-bitmap encoding analysis

Bitmap encoding composition

The bitmap file is mainly divided into the following four parts:
insert image description here

Take the color bit value of 4, 16-color image as an example

14+40+16x4+(32x1)/2=134
The hexadecimal data of the bitmap is as follows
Offset          0  1    2   3   4   5   6   7    8   9  10  11 12 13 14 1500000000   42 4D 86 00 00 00 00 00  00 00 76 00 00 00 28 0000000016   00 00 20 00 00 00 01 00  00 00 01 00 04 00 00 0000000032   00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 0000000048   00 00 00 00 00 00 00 00  00 00 FF FF FF 00 00 5500000064   FF 00 00 00 FF 00 55 00  FF 00 AA 00 FF 00 FF 0000000080   FF 00 FF 00 AA 00 FF 00  55 00 FF 00 00 00 FF 5500000096   00 00 FF AA 00 00 FF FF  00 00 AA FF 00 00 55 FF00000112   00 00 00 FF 00 00 02 03  04 05 06 07 08 09 0A 0B00000128   0C 0D 0E 0F 13 28

insert image description here
insert image description here
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/changhuzichangchang/article/details/112723693