using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
int imageID1 = gdpictureImaging.CreateGdPictureImageFromFile("");
// Copy the specified region of an image to clipboard.
gdpictureImaging.CopyRegionToClipboard(imageID1, 50, 50, 100, 250);
// 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);
}