yeah, plain masking is simple. The tricky part is the contours, so prevent blocky contours, eg. in Chroma Keying for movies. But of course this only makes sense when you know the new background pixel, unless you store the masked image in a special format with alpha transparency for the contours: the more green a nonmasked pixel still is, the more transparent it's going to be, plus it will have to use the color tone of the background instead of its orignial greenish tone that is part of the green (masked) background.
I think photoshop is doing this too when you check the "antialiase" checkbox in the lasso tool.
I think photoshop is doing this too when you check the "antialiase" checkbox in the lasso tool.