return cm.fromRGB(pixel[0]/255.0, pixel[1]/255.0, pixel[2]/255.0).sample(lambda);
case 4:
{
double alpha = pixel[3] / 255.0;
if (MathUtil.equal(alpha, 1.0)) {
return cm.fromRGB(pixel[0]/255.0, pixel[1]/255.0, pixel[2]/255.0).sample(lambda);
} else if (MathUtil.equal(alpha, 0.0)) {
return background.evaluate(p, lambda);
} else {
Color bg = background.evaluate(p, lambda);
Color fg = cm.fromRGB(pixel[0]/255.0, pixel[1]/255.0, pixel[2]/255.0).sample(lambda);