VintaSoft Imaging .NET SDK 14.0: Документация для .NET разработчика
Vintasoft.Imaging Namespace / VintasoftImage Class / VintasoftImage Constructors / VintasoftImage Constructor(VintasoftBitmap,Boolean)
Синтаксис Example Требования Смотрите также
В этом разделе
    VintasoftImage Constructor(VintasoftBitmap,Boolean)
    В этом разделе
    Инициализирует новый экземпляр класса VintasoftImage.
    Синтаксис
    'Declaration
    
    Public Function New( _
    ByVal bitmap
    Растровый объект Vintasoft.
    As VintasoftBitmap, _
    ByVal disposeBitmapAfterUse
    Значение, указывающее, должно ли растровое изображение быть удалено при удалении этого VintasoftImage.
    As Boolean _
    )

    Parameters

    bitmap
    Растровый объект Vintasoft.
    disposeBitmapAfterUse
    Значение, указывающее, должно ли растровое изображение быть удалено при удалении этого VintasoftImage.
    Пример

    Вот C#/VB.NET код, который демонстрирует, как создать изображение из объекта VintasoftBitmap (растровое изображение будет удалено автоматически при удалении изображения).

    
    ' create a bitmap
    Dim bitmap As Vintasoft.Imaging.VintasoftBitmap = Vintasoft.Imaging.VintasoftImage.CreateBitmap(1000, 1000, Vintasoft.Imaging.PixelFormat.Bgr24)
    ' create an image from bitmap (bitmap will be disposed automatically when image is disposed)
            ' ...
    Using image As New Vintasoft.Imaging.VintasoftImage(bitmap, True)
    End Using
    
    
    
    // create a bitmap
    Vintasoft.Imaging.VintasoftBitmap bitmap = Vintasoft.Imaging.VintasoftImage.CreateBitmap(
        1000, 1000, Vintasoft.Imaging.PixelFormat.Bgr24);
    // create an image from bitmap (bitmap will be disposed automatically when image is disposed)
    using (Vintasoft.Imaging.VintasoftImage image = 
        new Vintasoft.Imaging.VintasoftImage(bitmap, true))
    {
        // ...
    }
    
    

    Требования

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

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