GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / CopyToClipboard Method
A unique image identifier of the GdPicture image representing the image in use.
Example





In This Topic
CopyToClipboard Method (GdPictureImaging)
In This Topic
Copies the specified GdPicture image represented by its unique image identifier into the clipboard.
Syntax
'Declaration
 
Public Function CopyToClipboard( _
   ByVal ImageID As Integer _
) As GdPictureStatus
public GdPictureStatus CopyToClipboard( 
   int ImageID
)
public function CopyToClipboard( 
    ImageID: Integer
): GdPictureStatus; 
public function CopyToClipboard( 
   ImageID : int
) : GdPictureStatus;
public: GdPictureStatus CopyToClipboard( 
   int ImageID
) 
public:
GdPictureStatus CopyToClipboard( 
   int ImageID
) 

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.
Remarks
Just to inform you, that this method uses the Clipboard class of the .NET Framework.

This method requires the Image Documents component to run.

Example
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);
}
See Also