Bitmaps and Bitmap Lists

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

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

BitmapList property

BitmapListCount property

The following methods let 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 object's current bitmap to another object's current bitmap by assigning the Bitmap property from one object to the other. You can remove the current bitmap from the list (freeing the bitmap) by setting the Bitmap property to 0. When an object has only one bitmap, you do not have to set the BitmapListIndex property to specify the current bitmap.

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

When assigning a bitmap list of one object to a bitmap list of another object, RefBitmapList property can be used to indicate whether to perform a copy, or simply move the source object’s BitmapList property to the destination object's BitmapList 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 the CorrelationX and CorrelationY properties with the X and Y coordinates of the points of correlated areas. The size of these properties is set using the CorrelationMaxPoints property. The CorrelationCount property is updated by the Correlation method with the number of correlated areas actually found.

The CorrelationList and CorrelationList2 methods compare the images in a bitmap list with all the areas of the same dimensions in the bitmap referenced by the pRaster parameter and finds those portions that match according to the measure of correlation.

CorrelationList method compares the images in the BitmapList property while the CorrelationList2 method compares the images in the LEAD bitmap list pointed by pRasterList parameter.

Correlated Area

The CorrelationListMaxPoints property gets or sets the maximum number of values that can be stored in the CorrelationListX and CorrelationListY properties. This is also equal to the maximum number of regions in bitmap referenced by pRaster that can be found to correlate. Also to update the CorrelationListIndex property and the CorrelationListCount property with the number of areas in the bitmap referenced by pRaster that correlate to an image in BitmapList property.