ImageGear Professional v18.2 > User Guide > Using ImageGear > Loading, Saving, and Acquiring Images > Copy/Paste |
Another technique for loading an IGPage Object with an image, and saving the image elsewhere involves copying (or cutting) to the Windows Clipboard and pasting from the Clipboard. These functions are performed by the IGPageDisplay Object, rather than the IGFormatsCtl Control. The "paste" operations will only function if the Windows Clipboard contains an image (as opposed to text).
When cutting or copying, the application must specify the portion of the image in the IGPage Object that is to be processed - this is specified via an IGRectangle Object called the ClipRectangle. For example, assume that the IGPage Object contains a 283x212 image. The following shows the result from various CopyToClipboard Method and CutToClipboard Method calls:
When pasting, the application can either replace the IGPage Object image entirely (PasteFromClipboard Method), or can merge the clipboard image into the IGPage Object image (PasteMergeFromClipboard Method). Examples of this are as follows: