www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/03/22:55:50

From: Flenser <flenser AT cs DOT iastate DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ANDing bitmaps under allegro
Date: Wed, 03 Nov 1999 10:19:31 -0600
Organization: Iowa State University, Ames, Iowa, USA
Lines: 26
Message-ID: <38206093.A877DBEC@cs.iastate.edu>
References: <381F80A9 DOT 2DE040EB AT cs DOT iastate DOT edu> <tc6pv7 DOT n77 DOT ln AT pedos DOT es>
NNTP-Posting-Host: friley-161-9.res.iastate.edu
Mime-Version: 1.0
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
To: djgpp AT Delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I am running at 8bpp. Basically, I have a bitmap containing an image,
and then another with a silhouette of that image in white on black. If I
were to AND them together, it would only draw the parts of the first
image that correspond to the white parts of the mask. I've tried this in
Paint Shop Pro 5, and it works nicely. I guess this would mean
performing a binary AND on the color of each pixel in the images.

gradha AT iname DOT com wrote:

> Flenser <flenser AT cs DOT iastate DOT edu> wrote:
> > I need to AND two bitmaps together, and assign the result to a new
> > bitmap. Does anyone know how to do this?
>
> But what do you mean by ANDing? Do you mean merging to colors at
> 50% each, taking the bits of one colors and anding them bit to bit,
> add the colors, or the bits of the colors?
>
> And then, what color depth are you talking about? Because bit-anding
> on 8 bpp is different than on other resolutions, since the "color"
> is in fact an index to a palette containing the color...
>
> Grzegorz Adam Hankiewicz - gradha AT iname DOT com
> Gogosoftware - http://welcome.to/gogosoftware/
>
> "I gotta be me; I'm too good to be anyone else." - Garfield.

- Raw text -


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