1IM_IFTHENELSE(3)           Library Functions Manual           IM_IFTHENELSE(3)
2
3
4

NAME

6       im_ifthenelse - use an unsigned char image to join two images together
7

SYNOPSIS

9       #include <vips/vips.h>
10
11       int im_ifthenelse(c, a, b, out)
12       IMAGE *c, *a, *b, *out;
13
14       int im_blend(c, a, b, out)
15       IMAGE *c, *a, *b, *out;
16
17

DESCRIPTION

19       im_ifthenelse  builds  an  output image which uses some pels from a and
20       some from b: if the conditional image c is non-zero at that point,  the
21       pel comes from a; if it is zero, the pel comes from b.
22
23       The  conditional  image  c can have either 1 band, in which case entire
24       pels come either from a or b, or n bands, where  n  is  the  number  of
25       bands  in both a and b, in which case individual band elements are cho‐
26       sen from a and b.
27
28       Images a and b must match in size, type and number of bands.
29
30       im_blend(3) works just as  im_ifthenelse(3),  except  that  instead  of
31       selecting  between  a  and b, values in the condition image are used to
32       softly blend between the two. 255 means a only, 0  means  b  only,  128
33       means 50:50.
34
35

RETURN VALUE

37       0 on success and -1 on error.
38

SEE ALSO

40       im_equal(3), im_and(3).
41
43       National Gallery
44

AUTHOR

46       J. Cupitt
47
48
49
50                                30 October 1992               IM_IFTHENELSE(3)
Impressum