I have two problems with using datatypes (for image conversion) that perhaps
someone here might have the answer to.
The first problem is converting a GIF with only 16 colors to display on a
screen of 256 colors. (An example of a GIF with only 16 colors is the
'Aminet.gif' logo at http://ftp.wustl.edu/~aminet/)
struct Screen *screen; // points to an open screen
char *file_name; // points to a string array with a valid filename
obj = NewDTObject(file_name,
I know that the object has been created, I can examine the BitMapHeader and
see that the depth = 4. I convert the object to a bitmap via the call:
However, when I blit this bitmap into a new bitmap into the window's
rastport with a minturn of 0xE0 (or 0xC0), I get an image with false
colors, as if it's trying to account for all 8 bitplanes when there are
only 4. I've tried using BltBitMap with various masks (7, 15, 65) but
I get the same results (using a mask of 1 or 3 provides different, but
still incorrect results).
== == == == == == == == == == == == ==
My second problem: is there an easy way to build a mask from a bitmap with
a transparent attribute by just knowing the transparent color?
I'd like to convert a gif (with a transparent color) to a bitmap and
then blit it to another bitmap, ignoring (ie, masking) the areas with
the transparent color. (If there's an easier way to do this, I'm all
As always...thanks in advance.
What you percieve here as opinions aren't readily shared by those I work for.
Edward Chadez, Lead Senior Programmer/Analyst at CARL Corporation
When web surfing, visit Galileo's Universe at http://galileo.carl.org/
Amiga user since 1988. Internet surfer since 1989. Grow up, not old.