Mask a color

Mask a color

Post by Stefano Bald » Mon, 09 Jun 2003 06:30:10



I would like to mask a specific color in a picture ( i need to replace a
kind of blue with white)
What's the easiest way?
Thanks
 
 
 

Mask a color

Post by Mike D Sutto » Mon, 09 Jun 2003 07:03:18


Quote:> I would like to mask a specific color in a picture ( i need to replace a
> kind of blue with white)
> What's the easiest way?

Fill a new image buffer with the new colour, then use TransparentBlt() to
draw the original over that excluding the colour you wish to convert.
Unfortunately TransparentBlt() is known to have a memory leak though, so if
you want to use it recursively or you just don't want your application to
leak at all then e-mail me and I'll send you over my ChromaBlt library as a
replacement.
Alternatively, if your image uses a palette then you can simply replace a
palette entry instead.
Hope this helps,

    Mike

 - Microsoft Visual Basic MVP -

WWW: Http://www.mvps.org/EDais/

 
 
 

Mask a color

Post by Stefano Bald » Mon, 09 Jun 2003 07:51:51


Thanks Mike
I think i need some more help
I want to customize color of selected item in a ListView bitblitting an item
with a
picture
The problem is when i perform bitblit the item has already been selected and
shown in blue
I just would like to avoid this
Any idea?



> > I would like to mask a specific color in a picture ( i need to replace a
> > kind of blue with white)
> > What's the easiest way?

> Fill a new image buffer with the new colour, then use TransparentBlt() to
> draw the original over that excluding the colour you wish to convert.
> Unfortunately TransparentBlt() is known to have a memory leak though, so
if
> you want to use it recursively or you just don't want your application to
> leak at all then e-mail me and I'll send you over my ChromaBlt library as
a
> replacement.
> Alternatively, if your image uses a palette then you can simply replace a
> palette entry instead.
> Hope this helps,

>     Mike

>  - Microsoft Visual Basic MVP -

> WWW: Http://www.mvps.org/EDais/

 
 
 

1. How to remove orange mask from color negatives?

I have a box full of high quality 4X5 color negatives. Can I (and then how
do I ) remove the orange color mask in order to print the pictures?
thanks
rtm

2. MultiPage Tiffs

3. Removing color negative color-mask

4. EPS

5. Performer color mask???

6. AI5.5 open PICT and EPSF

7. Changing Mask Color

8. Mask Pro 3 color decontamination disabled

9. Editing Mask color

10. Replacing colors -- Chroma Mask