This function copies the specified portion of the image to the system clipboard.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_clipboard_copy (
HIGEAR hIGear,
const LPAT_RECT lprcRectToCopy
);
|
Name | Type | Description |
---|---|---|
hIGear | HIGEAR | HIGEAR handle of the current image. |
rcRectToCopy | const LPAT_RECT | Far pointer to an AT_RECT struct specifying the rectangular portion of the image that is to be copied to the clipboard. |
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
All pixel formats supported by ImageGear for C and C++.
The copied pixels will be converted to 1-, 4-, 8-bit indexed or 24-bit RGB format for copying to the clipboard.
Clipboard, Image Processing
Copy Code
|
|
---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ AT_RECT rcRectToCopy; /* Rectangle of image to copy to clipboard */ AT_DIMENSION nImageWidth; /* Width of image */ AT_DIMENSION nImageHeight; /* Height of image */ /* Copy bottom half of image to system clipboard: */ rcRectToCopy.left = 0; rcRectToCopy.top = nImageHeight / 2; rcRectToCopy.right = nImageWidth - 1; rcRectToCopy.bottom = nImageHeight - 1; IG_clipboard_copy ( hIGear, &rcRectToCopy ); |
If rcRectToCopy = NULL, the entire image will be copied.
This function, like other ImageGear Image Processing and Clipboard API calls, takes an AT_RECT structure as an argument, so that you can process a rectangular sub-region of an image. However, before ImageGear performs the operation specified by this function, it will check to see if an internal flag has been set to TRUE, indicating that a mask HIGEAR should be used with the image. If the flag is set to TRUE, and a valid pointer to a mask image has been assigned, ImageGear will override the settings passed to the AT_RECT structure and use the non-rectangular ROI defined by the mask HIGEAR. To create a non-rectangular region of interest, call IG_IP_NR_ROI_to_HIGEAR_mask().