VintaSoft Imaging .NET SDK 14.0: Documentation for .NET developer
Vintasoft.Imaging Namespace / VintasoftImageGdiExtensions Class / GetAsBitmap Methods / GetAsBitmap(VintasoftImage) Method
Syntax Example Requirements SeeAlso
In This Topic
    GetAsBitmap(VintasoftImage) Method (VintasoftImageGdiExtensions)
    In This Topic
    Returns the System.Drawing.Bitmap object associated with this VintasoftImage object.
    Syntax
    'Declaration
    
    <ExtensionAttribute()>
    Public Overloads Shared Function GetAsBitmap( _
    ByVal image
    The image.
    As VintasoftImage _
    ) As System.Drawing.Bitmap
    [Extension()]
    public static System.Drawing.Bitmap GetAsBitmap(
    VintasoftImage image
    )
    [Extension()]
    public: static System.Drawing.Bitmap GetAsBitmap(
    VintasoftImage* image
    )
    [Extension()]
    public:
    static System.Drawing.Bitmap GetAsBitmap(
    VintasoftImage^ image
    )

    Parameters

    image
    The image.

    Return Value

    Example

    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");
    }
    
    

    Requirements

    Target Platforms: .NET9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also