int im_ifthenelse(c, a, b, out)
IMAGE *c, *a, *b, *out;
int im_blend(c, a, b, out)
IMAGE *c, *a, *b, *out;
The conditional image c can have either 1 band, in which case entire pels come either from a or b, or n bands, where n is the number of bands in both a and b, in which case individual band elements are chosen from a and b.
Images a and b must match in size, type and number of bands.
im_blend(3) works just as im_ifthenelse(3), except that instead of selecting between a and b, values in the condition image are used to softly blend between the two. 255 means a only, 0 means b only, 128 means 50:50.