Replacing colors in images?

Blitz3D Forums/Blitz3D Programming/Replacing colors in images?

Hi,

Does anyone know what would be the fastest way to replace colorA with one colorB, and colorC with colorD in an image?
I could loop trough all the pixels and replace, but would there be a more efficient way? Possibly by masking colorA and putting the image over an image with colorB, and doing the same for colorC and colorD?

Also, is there a built-in way to copy an image on top of another, but using simple filters, like you can do with textures using TextureBlend?

Thanks!

Hmmm, should have looked in the code archive prior to posting, these links seem to be what I'm looking for :

http://www.blitzbasic.com/codearcs/codearcs.php?code=883 (replace color)
http://www.blitzbasic.com/codearcs/codearcs.php?code=1371 (5 overlay effects)

I'll try them out tomorrow and see if they're what I need.