Artifact 226c71445a1600433a21e4038be906b2b09a01c9:
- File
operator/screen-rgb-grey8.crimp
— part of check-in
[2c2c0c2211]
at
2010-07-16 03:49:37
on branch ak-experimental
— Moved the support code for the binary operators to their own directory.
Added template code for all the missing directions between rgb, rgba, and grey8.
Added the missing operator implementations. For the commutative operators we are leaving out half of the missing, and handle them through commutation in the Tcl level. (user: andreask size: 579) [more...]
screen_rgb_grey8 Tcl_Obj* imageAObj Tcl_Obj* imageBObj /* * Pixel- and channel-wise 1-(1-A)*(1-B) combination of two images. The images * have to have equal dimensions. This could be done at Tcl level using a * combination of 'multiply' and 'invert'. Doing it in C on the other hand * avoids the three temporary images of that implementation. */ #define BINOP(a,b) (255 - (((255-(a))*(255-(b)))/255)) #include "binop_rgb_grey8.c" #undef BINOP /* vim: set sts=4 sw=4 tw=80 et ft=c: */ /* * Local Variables: * mode: c * c-basic-offset: 4 * fill-column: 78 * End: */