VintaSoft Imaging .NET SDK 15.2: Документация для .NET разработчика
Vintasoft.Imaging Namespace / VintasoftImageGdiExtensions Class / GetAsBitmap Methods / GetAsBitmap(VintasoftImage) Method
Синтаксис Example Требования Смотрите также
В этом разделе
GetAsBitmap(VintasoftImage) Метод (VintasoftImageGdiExtensions)
В этом разделе
Возвращает объект System.Drawing.Bitmap, связанный с этим объектом VintasoftImage.
Синтаксис
'Declaration

<ExtensionAttribute()>
Public Overloads Shared Function GetAsBitmap( _
ByVal image
Изображение.
As VintasoftImage _
) As System.Drawing.Bitmap
[Extension()]
public static System.Drawing.Bitmap GetAsBitmap(
VintasoftImage image
)

Parameters

image
Изображение.

Return Value

Объект System.Drawing.Image.
Пример

Вот C#/VB.NET код, который демонстрирует, как загрузить изображение с диска, скопировать изображение в буфер обмена, обработать изображение во внешнем редакторе изображений, скопировать изображение обратно из буфера обмена и сохранить обработанное изображение.


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

Требования

Целевые платформы: .NET 11; .NET 10; .NET 9; .NET 8; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

Смотрите также