Re: display_image()

new topic     » goto parent     » topic index » view thread      » older message » newer message

I'm still a little lost. What is the easiest ways to use transparency? Best
example?

----- Original Message -----
From: "Irv Mullins" <irvm at ellijay.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: display_image()


>
> On Sunday 05 August 2001 05:52, pwcroft at home.com wrote:
>
> >     I'm using display_image() and I'm having the following problem. I
use
> > it once, to display the picture of a map, then again, to put a picture
of a
> > compass in the corner of the screen. But when I display the compass, the
> > map vanishes, and I have a black screen, with the compass in the corner.
> > Why is that?  How do I fix it?
>
> Are you trying to overlap the images? That won't work (without some extra
> effort) because bitmaps don't support transparency.
>
> If the images are NOT overlapping, you still have to arrive at a common
> "palette" of colors. If you are using, for example, 256 colors, DOS keeps
> an array of [0...255], and in each element of that array, stores the color
> value for that color.  If color[12] = 0, then color[12] would be black.
> Your bitmaps have a similar array attached (the palette) which may
> have some other value altogether stored in color[12].  Loading a new
> bitmap can change all the colors of the bitmap which is already on
display.
>
> It's quite possible that your compass bitmap has only a few colors, with
> zero stored in the rest of the color array. Therefor, most or all of the
> colors in your map get changed to black when the compass is loaded.
>
> The way to avoid this is to convert all your bitmaps to use the same,
> common set of colors. Most good photo editing programs can do that,
> programs like PaintShop Pro.
>
> Regards,
> Irv
>
>
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu