-
February 20th, 2003, 11:44 AM
#1
GDI, bitmaps, color keying, masking?
I need to write an application that takes three bitmaps:
* one full color
* one with the same picture grayed out
* one with patches of distinct colors that are intended to block out areas of the full color bitmap
and write an app such that given a list of the patch colors, render the grayed out bitmap with the indicated patch areas rendered from the full color bitmap. You know, to simulate selected areas, say on a vehicle for example.
Now I can do this using the bitmap functions of GDI. I would load everything into memory, do a byte analysis and assemble the bitmap in memory myself, then blit it to the target.
But I'm wondering if there are any GDI functions that can allow me to draw one bitmap using another as a mask with color keying?
So far I've only found TransparentBlt, which allows me to render a bitmap with one color transparent - which unfortunately doesn't suit my needs.
I also see MaskBlt, which uses a monochrome mask, which I would still need to assemble myself.
Any reference to function names or articles would be wonderful. Thanks!
- killRoy
-
February 20th, 2003, 11:48 AM
#2
Sorry about all the multi-posts, my browser is acting up.
I don't have permission to delete the others *pout*
-
February 20th, 2003, 12:14 PM
#3
I can't tell you exactly how to do it, but it should be possible with a bit of work. The bitblt famialy of functions has a flag for ROP functions, which can be used to AND, OR, etc... two bmps. These are preform bitwise operations so you may have side effects if the image is 8 bit or less (the palette ordinals will be operated on).
To use these ROP operations you may still need masks for the various sections.
bytz
--This signature left intentionally blank--
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|