Image Arithmetic and Logical Operations

This chapter describes functions that modify pixel values of an image buffer using arithmetic or logical operations. It also includes functions that perform image compositing based on opacity (alpha-blending).

An additional suffix C, if present in the function name, indicates operation with a constant. Arithmetic functions that operate on integer data perform fixed scaling of the internally computed results. In case of overflow the result value is saturated to the destination data type range.

Note

Most arithmetic and logical functions support data with 1-,3-, or 4-channel pixel values. In the alpha channel case (AC4), the alpha channels are not processed.

For more complete information about compiler optimizations, see our Optimization Notice.