Artifact 96a6daac80ee4699ab2f8d2c55ffe2a04e9e6da4:
- File operator/div-rgba-rgb.crimp — part of check-in [b585eded7d] at 2011-11-23 04:33:44 on branch trunk — Modified the division operator involving grey8 to scale the result up by MAXVAL_GREY8. Without such scaling the result is mostly zero, which is not really wanted. (user: andreask size: 509) [more...]
div_rgba_rgb Tcl_Obj* imageAObj Tcl_Obj* imageBObj int scale int offset /* * Pixel- and channel-wise scaled and biased subtraction of two images. The * images have to have equal dimensions. Values out of range are wrapped into * it (modulo). */ #define BINOP(a,b) ((((b) == 0 ? WHITE : (MAXVAL_GREY8 * (a) / (b))) / scale) + offset) #include "binop_rgba_rgb.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: */