1. Datatypes, datatypes, datatypes
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,
DTA_SourceType, DTST_FILE,
DTA_GroupID, GID_PICTURE,
PDTA_Remap, TRUE,
PDTA_Screen, screen,
OBP_Precision, PRECISION_EXACT,
TAG_DONE);
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:
if (GetDTAttrs(obj,
PDTA_BitMap, &bmap,
TAG_DONE);
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
ears....)
As always...thanks in advance.
-Ed
--
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.
2. Automotile can't read my CR-RW's
3. FS: SS10 system, SBUS Boards, and more
4. Datatypes (picture.datatype) questions
6. Datatypes library V44 incompatible with datatypes library V40?
10. Docks (was: Re: Fooling Datatypes?)
11. Datatypes with older programs