virtual L_INT LBitmapRgn::ResizeRgn(uInflate, uFlag, bAsFrame)
Resizes the region defined in the class object's bitmap by the specified number of pixels.
Number of pixels by which to resize the region.
Flag that indicates whether to contract or expand the bitmap region. Possible values are:
Value | Meaning |
---|---|
RGN_EXPAND | [0x0001] Expand the region. |
RGN_CONTRACT | [0x0002] Contract the region. |
Flag that indicates whether to create a frame associated with the resized bitmap region. Possible values are:
Value | Meaning |
---|---|
TRUE | Create a frame of thickness uDim for the resized region. If uFlags is RGN_EXPAND, the frame created will exist outside the boundaries of the resized region. If uFlags is RGN_CONTRACT, the frame will be within the boundaries of the resized region. |
FALSE | Resize the region only. Do not create a frame. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function keeps the same bitmap handle and resizes the bitmap region that it references.
This function supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.
This function supports signed data images.
This function supports 32-bit grayscale images.
Win32, x64.
L_INT LBitmapRgn__ResizeRgnExample(LBitmap & Bitmap, L_TCHAR * szFile)
{
L_INT nRet;
LBitmapRgn Region;
nRet =Bitmap.Load(szFile);
if(nRet !=SUCCESS)
return nRet;
RECT rect = { Bitmap.GetWidth() / 4, Bitmap.GetHeight() / 4,
Bitmap.GetWidth() / 2, Bitmap.GetHeight() / 2 };
Region.SetBitmap(&Bitmap);
nRet =Region.SetRgnRect(&rect);
if(nRet !=SUCCESS)
return nRet;
nRet =Bitmap.Invert();
if(nRet !=SUCCESS)
return nRet;
nRet =Region.ResizeRgn(20, RGN_CONTRACT, FALSE);
if(nRet !=SUCCESS)
return nRet;
nRet =Bitmap.Invert();
if(nRet !=SUCCESS)
return nRet;
return SUCCESS;
}
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