Bitmaps and Bitmap Lists

To support multipage files and animation, the LEAD control can reference a list of bitmaps. In fact, even a control with only one bitmap has a list, and the list contains only the one bitmap.

The following properties reference the control's entire list of bitmaps:

BitmapList property

BitmapListCount property

The following methods lets you update a bitmap list:

InsertBitmapListItem method

DeleteBitmapListItems method

You can copy an entire list by assigning the BitmapList property from one control to another. You can free all of the bitmaps in the list by setting the property to 0. You can also reference the entire list of bitmaps when you load and save multipage files and when you play the list as an animation.

Most methods and properties reference only one bitmap (the current bitmap). When there is a list of bitmaps, the following property lets you specify the current bitmap:

BitmapListIndex property

The following property references the control's current bitmap:

Bitmap property

You can copy one control's current bitmap to another control's current bitmap by assigning the Bitmap property from one control to the other. You can remove the current bitmap from the list (freeing the bitmap) by setting the Bitmap property to 0. When a control has only one bitmap, you do not have to set the BitmapListIndex property to specify the current bitmap.

When assigning a bitmap of one control to a bitmap of another control, RefBitmap property can be used to indicate whether to perform a copy, or simply reference the source control’s Bitmap property.

To copy images between the VCL Main Control and the LEADTOOLS ActiveX controls, use:

OCXBitmap property

To delete a specific page from a multipage file that supports delete operations, use the following method:

DeletePage method

Comparing Images

Two bitmaps or parts of two bitmaps can be compared using the Correlation method. This method compares all or part of one bitmap with all the areas of the same dimensions in another bitmap and finds those areas that match according to the measure of correlation. The Correlation method updates its parameters with the X and Y coordinates of the points of correlated areas and the number of correlated areas actually found.