At 10:38 AM -0700 4/29/99, Michael A Smith/SJC/Lotus wrote:
>My problem is that I need to do what PILRC is doing
>Somehow I need to take my bitmap & massage it
>into the structure needed to be a Tbmp
Look at the BitmapType structure in WindowNew.h. A 'Tbmp' uses that structure.
There's a 3rd party article out there somewhere that describes the (current)
compression scheme as well -- do a web search using www.google.com or your favorite
search engine.
If it helps, here is a rez/derez description of the Tbmp/BitmapType structure. I'm
not absolutely positive it's correct, it's just something I poked at for a while last
fall.
--Bob
type 'Tbmp' {
array Images {
switch {
case Uncompressed:
integer; /* width; */
Height: integer; /* height; */
RowBytes: integer; /* rowBytes; */
key integer = 0; /* flags; */
byte; /* pixelSize; bits/pixel */
byte; /* version; */
NextOffset: integer; /* nextDepthOffset - # of DWords to next
BitmapType */
fill word[2]; /* reserved [2]; */
hex string[$$Word(RowBytes[$$ArrayIndex(Images)]) *
$$Word(Height[$$ArrayIndex(Images)])];
align LONG;
case Compressed:
integer; /* width; */
HeightComp: integer; /* height; */
RowBytesComp: integer; /* rowBytes; */
key integer = -32768; /* flags; */
byte; /* pixelSize; bits/pixel */
byte; /* version; */
NextOffsetComp: integer; /* nextDepthOffset - # of DWords to next
BitmapType */
fill word[2]; /* reserved [2]; */
hex string[(($$Word(NextOffsetComp[$$ArrayIndex(Images)]) - 4) <<
2)];
align LONG;
case Uncompressed_HasColorTable:
integer; /* width; */
HeightCT: integer; /* height; */
RowBytesCT: integer; /* rowBytes; */
key integer = 16384; /* flags; */
byte; /* pixelSize; bits/pixel */
byte; /* version; */
NextOffsetCT: integer; /* nextDepthOffset (dword) */
fill word[2]; /* reserved [2]; */
integer noColorTable = 0; /* color table */
hex string[$$Word(RowBytesCT[$$ArrayIndex(Images)]) *
$$Word(HeightCT[$$ArrayIndex(Images)])];
align LONG;
case Compressed_HasColorTable:
integer; /* width; */
HeightCompCT: integer; /* height; */
RowBytesCompCT: integer; /* rowBytes; */
key integer = -16384; /* flags; */
byte; /* pixelSize; bits/pixel */
byte; /* version; */
NextOffsetCompCT: integer; /* nextDepthOffset (dword) */
fill word[2]; /* reserved [2]; */
integer noColorTable = 0; /* color table */
hex string[(($$Word(NextOffsetCompCT[$$ArrayIndex(Images)]) - 4) <<
2)];
align LONG;
};
};
}; /* end Tbmp */