Using threshold() to change colours in a bitmap

Hi guys,

I’m trying to use threshold to change the colours in a bitmap image according to a lookup table. I’ve tried the following line of code to convert each colour to another, but without any luck:

bmd.threshold(bmd, bmd.rect, new Point(), "==", originalColour, newColour);

Can someone please tell me if this is possible? I have not had much luck so far, I’ve only managed to generate a black and white image, or nothing at all.

Any advice greatly appreciated!

Thanks

Anton