delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/03/11:52:56

Date: Mon, 3 Jan 2000 01:21:31 +0100 (CET)
From: Wilmer van der Gaast <lintux AT dds DOT nl>
To: djgpp AT delorie DOT com
Subject: Re: transparent bitmaps
In-Reply-To: <84nbap$gdo$1@planja.arnes.si>
Message-ID: <Pine.LNX.4.10.10001030118150.1373-100000@syscon.minilinux.org>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 2 Jan 2000, Matej wrote:

> > Just pick a color that you want to be transparent, most people choose 255
> > or just 0, and make a BMP displayer that skips the pixels with that value.
> 
> 
> Yes, but how to do it? Can you give me an example?
> Thanks
Well, picking the color is something you can do by yourself.
Skipping is just a simple 'if'


if( value != 255 )
	screen[ptr] = value;
	
instead of just

screen[ptr] = value;


I don't know what your code looks like exactly, but this is a simple example.
If you can send me the complete bmp loader, I will tell you what to do.
Btw. It might be a better idea to send the code to my email address instead
     of the mailinglist/newsgroup.

---------

Wilmer van der Gaast (lintux AT dds DOT nl)
ICQ 55707076

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019