fraFrame(i).GCGraphicControl.TransparentColor = Asc(Mid$(strFrame, 7, 1))
This is the index to the transparent color. I should have made it this
fraFrame(i).GCGraphicControl.TransparentColorIndex = Asc(Mid$(strFrame, 7, 1))
To get the actual transparent color you must:
1) determine if the frame uses the Global Color Table or the Local Color Table.
2) from which ever color table is used, multiple the Index by 3 and add that answer to the base of the color table.
3) extract out 3-bytes from the table. 1st byte = R, 2nd byte = G, and 3rd byte = B or (RGB)
Now these three bytes are in character format so they will need to be converted to ascii and converted to Long variable
So you would use something like this
Dim TransparentColor As Long
TransparentColor = B * 65536 + G * 256 + R
then you would do this:
TransparentBlt ................ , aimg(i).BackColor = TransparentColor
4) if there is a Global Color Table it starts here at position 14 in the file:
5) if there is a Local Color Table (per frame) then you use it (per frame) instead of the Global Color Table.
6) if there is a Local Color Table it starts here (example, Left.gif uses Local Color Table):
Code:
1st Color --+ +--2nd Color +-- Last Color
| | |
+--+----+----+----+----+-+-+-+-+-+-+-+-----+-+-+-+
|2C| | | | | |R|G|B|R|G|B|.....|R|G|B|
+--+----+----+----+----+-+-+-+-+-+-+-+-----+-+-+-+