delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/04/18:32:47

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro-bitmaps
Date: Thu, 4 Jun 1998 20:27:52 +0100
Organization: None
Message-ID: <SCBjKYA4Uvd1Ew2Z@talula.demon.co.uk>
References: <35769F50 DOT 9779A15 AT swipnet DOT se>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 19
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Viktor Fägerlind writes:
>I want to use pictures with black background in a truecolor game. But to
>get the background transparent I have to make it pink! I can´t change
>every background color manually, what shall I do?

You could modify Allegro to use a black mask color, or you could write a
function that would scan through your images and replace the black
pixels with pink ones after you load them, but if you do either of these
things you will lose the ability to use any black color in your sprites,
which strikes me as an unreasonable restriction to place on your
artwork!

Any decent paint program will provide a floodfill or color replacement
function, so surely it won't take _that_ long to alter your graphics?


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
"Miracles are nothing if you've got the wrong intentions" - Mike Keneally

- Raw text -


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