File Extension: BAM
Content: Animations and Icons

 

Header:

Offset Size Description
0000h 0004h FileType
0004h 0004h FileRevision
0008h 0002h FrameCount
000Ah 0002h AnimationCount
000Ch 0004h FrameHeaderTableOffset
0010h 0004h ColorTableOffset
0014h 0004 SequenceTableOffset

 

FrameHeader:

Offset Size Description
0000h 0002h FrameWidth
0002h 0002h FrameHeight
0004h 0002h FramePositionHorizontal
0006h 0002h FramePositionVertical
0008h 0004h FrameDataOffset

 

SequenceHeader:

Offset Size Description
0000h 0002h SequenceSize (counted in Frames)
0002h 0002h SequenceOffset (countedin Frames)

 

Color:

Offset Size Description
0000h 0001h ColorComponentRed
0001h 0001h ColorComponentGreen
0002h 0001h ColorComponentBlue
0003h 0001h ColorComponentAlpha (not implemented)

ColorTable:

Offset Size Description
0000h 256*Color ColorTable

Special ColorTable Entries:

Index Description Default Value
00h ColorBackground (Transparent) Green(00h,FFh,00h,00h)
01h ColorItemFrame Cyan(00h,FFh,FFh,00h)

 

SequenceElement:

Offset Size Description
0000h 0002h FrameIndex

 

FrameDataElement:

Offset Size Description
0000h 0001h ColorTableIndex

Transparent Pixels in FrameData are RLE Compressed:
00 (StartByte) XX (Number Of Transparent Pixels+1)

<FrameDataElement> ::= <Pixel> | <RLEPixel>;
<Pixel> ::= 01h..FFh;
<RLEPixel> ::= 00h <TransparentPixelCount>;
<TransparentPixelCount> ::= 00h..FFh;

 

 

 

 

 

 

1