You may copy or cut all or part of an ImGearRasterPage instance to the clipboard:
- To copy image data, call ImGearRasterPage.CopyToClipboard.
- To cut image data replacing it with a specified fill color, call ImGearRasterPage.CutToClipboard. Note that a solid RGB fill color is required when calling cut. If the actual color space of the image is not RGB, ImageGear .NET will automatically use the closest possible match.
- To limit a copy or cut operation to only a portion of an ImGearRasterPage instance, first set the ImGearRasterPage.ROI property (which specifies the active region of interest). Note that a region of interest can be either rectangular (using ImGearROIRectangle) or non-rectangular (using ImGearROIMask).
![]() |
When using an ImGearROIMask to set the non-rectangular region of interest, ImageGear .NET does not actually apply the mask before copying or cutting to the clipboard. Instead, both the mask and underlying image data are copied to the clipboard using a proprietary format. As long as this clipboard data is retrieved using the static ImGearRasterPage.GetFromClipboard method, the returned ImGearRasterPage instance will contain both the rectangular image data and a matching non-rectangular mask (as an ImGearRasterPage.ROI property). However, if the data from the Windows clipboard is pasted into a third-party application, the mask will not be honored. Instead, the entire rectangular region beneath the bounding box, defined by the mask, will be pasted. |