Image masking in another color?
BlitzPlus Forums/BlitzPlus Programming/Image masking in another color?
| ||
Hi, Does anybody know how to "mask" a colour in a picture with another color. Maybe this techique is not called masking, don't know any other term. Practically it's replacing one color with another (in the whole pic). I'm looking for something like: MaskImage ImageHandler, R-src, G-src, B-src, R-Dest, G-Dest, B-Dest MaskImage MyPic,255,0,255,100,110,120 Or probably someone has written already a routine to do this? I need a really fast blitting mechanism. Thanks in advance, Paul |
| ||
If you just want to globally replace all pixels with another colour (eg replace all blue ones with red) you could set source image mask colour to 0,0,255 and then draw it onto another image of the same size with Red background. Then copyimage it back and free the temporary image. |
| ||
i did one http://www.blitzbasic.com/codearcs/codearcs.php?code=883 |
| ||
Yhooo thanks guys (both of you). Thanks Ford Escort for the code snippet... Paul K. |