The Victor Library provides many ways that images can be combined. These examples are all using grayscale images where black pixels have the value zero and white pixels have the value 255. If a computed result pixel value is greater than 255 it is set to 255. If a result value is less than zero it is set to zero.
These functions operate on 8-bit grayscale and 24-bit RGB color images. The bitwise AND, OR, and XOR functions also operate
on 1-bit black and white images.
| Function | Operation | Description |
| addimage | Result = Source + Operator | Add two images |
| addtexture | Result = Source + Operator - 128 | Put a texture onto an image |
| andimage | Result = Source AND Operator | Bitwise AND two images |
| bleachimage | Result = (255-Source) * (255-Operator) / 255 | Unusual effect |
| copyimage | Result = Source | Place side-by-side, top-to-bottom, or copy to any position |
| cover |
if Operator > threshold then
if Operator <= threshold then | Overlay two images, transparent range of colors |
| coverclear |
if Operator = transcolor then
else | Overlay two images, transparent color |
| darker |
if Source < Operator then
else | Darker pixels of each image |
| difference | Result = Source - Operator + 128 | Positive difference is bright, negative difference is dark |
| differenceabs | Result = | Source - Operator| | Absolute value of the difference |
| divideimage | Result = Source / Operator | Divide one image by the other |
| isolate | Result = (Source + Operator) | Operator is black area to isolate and white elsewhere |
| lighter |
if Source > Operator then
else | Lighter pixels of each image |
| multiplyimage | Result = Source * Operator / 255 | Multiply two images |
| multnegimage | Result = 255 - ((255-Source) * (255-Operator) / 255) | Unusual effect |
| orimage | Result = Source OR Operator | Bitwise OR two images |
| subimage | Result = Source - Operator | Subtract two images |
| wtaverage | Result = (weight * Source + (100 - weight) * Operator) / 100 | Weighted average of two images |
| xorimage | Result = Source XOR Operator | Bitwise XOR two images |
| correlationcoef | Calculate the correlation coefficient between two images as a double precision floating point number | |
| correlateimages | Calculate the correlation coefficient between the Operator image and the Source image at every pixel position in the Source image and places the scaled coefficient data in the Result image. | |
Victor Image Processing Library homepage | Victor Product Summary | more Source code