You can save a region in the alpha channel of a 16- or 32-bit file. For an example, refer to LBitmapBase::SetAlpha.
You can use the LBitmapBase::HasRgn function to see if a bitmap has a region. If the bitmap has a region, you can do the following with it:
Use LPaint::FrameRgn to outline the region.
Display the region using functions described in Displaying a Region.
Use LBitmapRgn::GetRgnHandle to create a Windows region that is a snapshot of the bitmap region.
Use LBitmapRgn::Offset to move the region.
Use LBitmapRgn::GetRgnArea, LBitmapRgn::GetRgnBounds, and LBitmapRgn::IsPtInRgn to get information about the region's size and location.
Use LPaint::ColorRgn to display a filled, color representation of a region.
Determine the number of maximum number of segments present in any row in the region by calling LBitmapRgn::GetClipSegmentsMax. Once this is known, a buffer can be allocated and the segments can be retrieved using the LBitmapRgn::GetClipSegments function.
To create a new region, or update an existing region, based on either an HSV range or an RGB range, use the LBitmapRgn::SetRgnColorHSVRange function or the LBitmapRgn::SetRgnColorRGBRange function.
To create a new curve region, or update an existing region with a curve region, use LBitmapRgn::SetRgnCurve.
To resize a bitmap region a specific number of pixels, use the LBitmapRgn::ResizeRgn function.
Use LBitmapRgn::Free to free the region.
Use LBitmapRgn::Free to free the region.
To create a new curve region, or update an existing region with a curve region, use LBitmapRgn::SetRgnCurve.
To resize a bitmap region a specific number of pixels, use the LBitmapRgn::ResizeRgn function.
Use LBitmapRgn::HolesRemovalRgn to remove holes from a bitmap region.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.