ImgAddAnd |
Top Previous Next |
Prototype
ImgAddAnd(intDestinationImageHandle,intSourceImageHandle)
Description
Copies the source image into destination image, overwriting its preceding content and applying logical "AND" operation on between each bit of source and of destination. Source and destination handles must refers to images that have the same size and same bits per pixel.
Parameters
intDestinationImageHandle: integer value corresponding to the destination image handle.
intSourceImageHandle: integer value corresponding to the source image handle.
Returned value
None.
Example
// =========================================================== // This sample show common pixel between two monochrome images // ===========================================================
// Load a template image CommonImage:= ImgOpen('c:\images\template.tif')
// Scale the template according to current image size ImgScale(CommonImage, ImgGetWidth(_CurrentImage), ImgGetHeight(_CurrentImage), false);
// If template black color is not "1" then the template is inverted if ImgGetBlackValue(CommonImage)=0 then ImgInvert(CommonImage);
// If current image black color is not "1" then the image is inverted if ImgGetBlackValue(_CurrentImage)=0 then ImgInvert(_CurrentImage);
// Add in the template the current image using logical AND operation ImgAddAnd(CommonImage,_CurrentImage);
// Show the template, featuring common pixels, in the preview window ImgShow(CommonImage);
// Delete the template ImgDelete(CommonImage);
|