Leadtools Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
CreateMaskFromRegion Method
See Also 
Leadtools Namespace > RasterImage Class : CreateMaskFromRegion Method



Creates a 1-bit mask image from the region that is defined in the image.

Syntax

Visual Basic (Declaration) 
Public Function CreateMaskFromRegion() As RasterImage
Visual Basic (Usage)Copy Code
Dim instance As RasterImage
Dim value As RasterImage
 
value = instance.CreateMaskFromRegion()
C# 
public RasterImage CreateMaskFromRegion()
C++/CLI 
public:
RasterImage^ CreateMaskFromRegion(); 

Return Value

The newly created RasterImage which will be updated with a 1-bit, black-and-white image, where pixels from the region are white, and all others are black.

Example

This example will load an image, sets a color region using black, and then creates a 1-bit mask image from that image and saves it to disk .

Remarks

For more information, refer to Implementing Transparency.

For more information, refer to Creating a Region.

For more information, refer to Saving A Region.

For more information, refer to Working with the Existing Region.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also