Updates the overlay image pixels with the bits from the corresponding bitplane of the main image.
Public Sub UpdateOverlayBits( _
ByVal index As Integer, _
ByVal flags As Leadtools.RasterUpdateOverlayBitsFlags _
The index of the overlay used in the process.
Flags that determine whether the main image or the overlay image should be updated.
The image memory must be locked when you use this method. Normally, you can call Access to lock the memory before starting an operation that uses this method. Then call Release when the operation is finished.
This method can also update the main image's bitplane with the data from the overlay image.
This method is available in the (Document/Medical only) Toolkits.
The overlay at index must have the corresponding bitplane set: otherwise, this method will throw a RasterException with RasterExceptionCode.OverlayIndex. This index is zero-based and should be less than or equal to MaxOverlays.
If RasterUpdateOverlayBitsFlags.FromOverlay is set in flags, the bitplane in the main image will be updated to match the overlay image data. The left and top coordinates for the overlay image are used. If RasterUpdateOverlayBitsFlags.Clear is set, the bits from the bitplane associated with the overlay are set to 0 if they are not covered by the overlay. If RasterUpdateOverlayBitsFlags.Clear is not set, the bits from the bitplane associated with the overlay that are not covered by the overlay image are left unchanged.
If RasterUpdateOverlayBitsFlags.FromImage is set in flags, the overlay image will be updated with the bits from the corresponding bitplane. The size of the overlay image is unchanged if it has ever been set. If the overlay image has never been set, the overlay image will be from left, top coordinate to the bottom-right corner of the image:
OverlayWidth = Image.ImageWidth - OverlayImage.Origin.X OverlayHeight = Image.ImageHeight - OverlayImage.Origin.Y
For more information, refer to Overlay Overview.
For an example, refer to GetOverlayImage.
Medical Web Viewer .NET