ImageGear .NET v25.0 - Updated
CopyToClipboard Method




ImageGear.Core Assembly > ImageGear.Core Namespace > ImGearRasterPage Class : CopyToClipboard Method
Copies the page (or a portion of the page) into system clipboard.
Syntax
'Declaration
 
Public Sub CopyToClipboard() 
'Usage
 
Dim instance As ImGearRasterPage
 
instance.CopyToClipboard()
public void CopyToClipboard()
public: void CopyToClipboard(); 
public:
void CopyToClipboard(); 
Remarks
Prior to processing the image, the method checks whether the page has the ROI initialized (rectangular or non-rectangular), and if it exists, copies the portion of the image, specified by bounding rectangle of the ROI. The non-rectangular ROI image (ImGearROIMask) also will be placed into the clipboard using ImageGear's proprietary format, then automatically will be retrieved and attached to the main image upon call of the GetFromClipboard.

Any third party application that supports pasting from the clipboard, will be able to retrieve the copied image. However, if it has the ROI, the mask will not be honored. Instead, the entire rectangular region beneath the bounding box, defined by the mask, will be pasted.

Note: The copied pixels will be converted to 1-, 4-, 8-bit Indexed or 24-bit RGB format for copying to the clipboard.

Note: The clipboard API can only be used in threads set to single thread apartment (STA) mode.

Note: The Windows clipboard does not support multiple access at the same time. It means, that attempt to use CopyToClipboard or GetFromClipboard simultaneously from multiple threads will lead to impossibility to copy/paste the image to/from the clipboard - the ImGearException will be thrown.

See Also

Reference

ImGearRasterPage Class
ImGearRasterPage Members
ROI Property
ImGearROI Class
ImGearROIRectangle Class
ImGearROIMask Class