Regions can be saved inside TIFF files. Whenever you save a bitmap containing a region as a TIFF file format, the region is also saved.
When you save a bitmap with a region as a CUR or ICO file, the pixels inside the region are considered to belong to the icon/cursor data. The pixels outside the region are considered transparent. If you save a bitmap without a region as a CUR or ICO file, the whole bitmap will be considered icon/cursor data. In this case, you will get a square icon or cursor.
If you save a bitmap with a region as any other file format, the region will be lost. If you want to preserve the region, you can:
Save it to a 1-bit mask using the LBitmapRgn::CreateMaskFromBitmapRgn function and save the mask as a separate file. When you load the bitmap, you should load the mask bitmap and set the region using the LBitmapRgn::SetRgnFromMask function.
Save it to the alpha information in a 16/32-bit image. You would convert the region to a 1-bit mask using the LBitmapRgn::CreateMaskFromBitmapRgn function, after which you would set the mask to the alpha channel using the LBitmapBase::SetAlpha function. During load, you would get the alpha bitmap with the LBitmapBase::CreateAlphaBitmap function, convert it to 1-bit if necessary and then set the region with the LBitmapRgn::SetRgnFromMask function.
NOTE: To save a region inside a TIFF file, you must have an unlocked Document, Vector, or Medical Imaging license.
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.