CopyToClipboard Method (GdPictureImaging)
Copies the specified GdPicture image represented by its unique image identifier into the clipboard.
'Declaration
Public Function CopyToClipboard( _
ByVal As Integer _
) As GdPictureStatus
Parameters
- ImageID
- A unique image identifier of the GdPicture image representing the image in use.
Return Value
A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.
We strongly recommend always checking this status first.
Creating a new image from an existing image using clipboard and processing the newly created image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
int imageID1 = gdpictureImaging.CreateGdPictureImageFromFile("");
// Copy the specified region of an image to clipboard.
gdpictureImaging.CopyToClipboard(imageID1);
// Create a new image from clipboard data.
int imageID2 = gdpictureImaging.CreateGdPictureImageFromClipboard();
// Process newly created image.
gdpictureImaging.FxSepia(imageID2);
gdpictureImaging.SaveAsPNG(imageID2, "image.png");
// Release used resources.
gdpictureImaging.DeleteClipboardData();
gdpictureImaging.ReleaseGdPictureImage(imageID1);
gdpictureImaging.ReleaseGdPictureImage(imageID2);
}