I am trying to figure out the .dmi format so I can create some gfx effects for my icons. I was woundering if any one could exlain the bottom of the .dmi format in better detail than the last post made by Lummox JR. The part in his post that I didnt quite understand is bellow. I would be thankful for any feedback.
RLE compressed:
Starting at upper left, going to lower right, by row
measure each "run" of solid color, up to 255
n bytes: Length of run (1 byte each)
y bytes: Color encoding
x = bits per color (1 for 2-color, 2 for 3-4, 3 for 5-8...)
y = (n+k)*x/8, where 0<=k<8
(y must be an integral number of bytes holding an integral number of x-bit values)
e.g.:
x=8, n=51: y=51
x=4, n=51: y=52*4/8=26
x=3, n=51: y=56*3/8=21
x=2, n=51: y=52*2/8=13
x=1, n=51: y=56*1/8=7
Non-compressed:
Starting in the upper left and moving on by row,
encode each color, 1 byte each
Mouse hotspots: (after all states)
1 byte: 02
3 bytes per icon:
byte 2 byte 1 byte 0
00000000 00000yyy yyyxxxxx
x: Distance from left starting at 0; 0 by default
y: Distance from top starting at 0; 32 by default
Default 3-byte value is (0,32): 00 04 00
ID:268329
Jun 16 2004, 4:56 am
|
|