GetAsBitmap(VintasoftImage) Method (VintasoftImageGdiExtensions)
Returns the
System.Drawing.Bitmap object associated with this
VintasoftImage object.
This C#/VB.NET code shows how to load image from disk, copy image to clipboard, process image in external image editor, copy image back from the clipboard and save processed image.
' load image from file
Using image As New Vintasoft.Imaging.VintasoftImage("c:\original-image.tif")
' copy image to clipboard
System.Windows.Forms.Clipboard.SetImage(Vintasoft.Imaging.VintasoftImageGdiExtensions.GetAsBitmap(image))
' process image in external image editor and place it back to the clipboard
' ...
' get image from the clipboard
image.SetImage(Vintasoft.Imaging.VintasoftImageGdiExtensions.Create(System.Windows.Forms.Clipboard.GetImage(), True))
' save image to the file
image.Save("c:\processed-image.jpg")
End Using
// load image from file
using (Vintasoft.Imaging.VintasoftImage image =
new Vintasoft.Imaging.VintasoftImage(@"c:\original-image.tif"))
{
// copy image to clipboard
System.Windows.Forms.Clipboard.SetImage(Vintasoft.Imaging.VintasoftImageGdiExtensions.GetAsBitmap(image));
// process image in external image editor and place it back to the clipboard
// ...
// get image from the clipboard
image.SetImage(Vintasoft.Imaging.VintasoftImageGdiExtensions.Create(
System.Windows.Forms.Clipboard.GetImage(), true));
// save image to the file
image.Save(@"c:\processed-image.jpg");
}
Target Platforms: .NET9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5