31 |
* |
* |
32 |
* |
* |
33 |
* combine two images in the following way |
* combine two images in the following way |
34 |
* IM = IM1 * alpha + IM2 * (1-alpha) |
* IM = IM1 * alpha + IM2 * (1-alpha) |
35 |
* |
* |
36 |
*/ |
*/ |
37 |
|
|
38 |
|
|
39 |
/*** UNFINISHED and UNTESTED */ |
/*** UNFINISHED and UNTESTED */ |
40 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
64 |
ret->type = FLIMAGE_RGB; |
ret->type = FLIMAGE_RGB; |
65 |
|
|
66 |
flimage_get_linearlut(ret); |
flimage_get_linearlut(ret); |
67 |
|
|
68 |
/* convert to RGB */ |
/* convert to RGB */ |
69 |
flimage_convert(im1, FLIMAGE_RGB, 0); |
flimage_convert(im1, FLIMAGE_RGB, 0); |
70 |
flimage_convert(im2, FLIMAGE_RGB, 0); |
flimage_convert(im2, FLIMAGE_RGB, 0); |
82 |
{ |
{ |
83 |
for ( x = 0; x < w; x++) |
for ( x = 0; x < w; x++) |
84 |
{ |
{ |
85 |
ret->red[y][x] = ret->llut[0][im1->red[y][x]] + |
ret->red[y][x] = ret->llut[0][im1->red[y][x]] + |
86 |
ret->llut[1][im2->red[y][x]]; |
ret->llut[1][im2->red[y][x]]; |
87 |
ret->green[y][x] = ret->llut[0][im1->green[y][x]] + |
ret->green[y][x] = ret->llut[0][im1->green[y][x]] + |
88 |
ret->llut[1][im2->green[y][x]]; |
ret->llut[1][im2->green[y][x]]; |
89 |
ret->blue[y][x] = ret->llut[0][im1->blue[y][x]] + |
ret->blue[y][x] = ret->llut[0][im1->blue[y][x]] + |
90 |
ret->llut[1][im2->blue[y][x]]; |
ret->llut[1][im2->blue[y][x]]; |
91 |
} |
} |
92 |
|
|
106 |
ret->green[y][x] = im1->green[y][x]; |
ret->green[y][x] = im1->green[y][x]; |
107 |
ret->blue[y][x] = im1->blue[y][x]; |
ret->blue[y][x] = im1->blue[y][x]; |
108 |
} |
} |
109 |
} |
} |
110 |
|
|
111 |
return ret; |
return ret; |
112 |
} |
} |