VintaSoft Imaging .NET SDK 12.4: Documentation for .NET developer
Vintasoft.Imaging Namespace / VintasoftImage Class / VintasoftImage Constructors / VintasoftImage Constructor(Int32,Int32,PixelFormat)
Syntax Exceptions Example Requirements SeeAlso
In This Topic
    VintasoftImage Constructor(Int32,Int32,PixelFormat)
    In This Topic
    Initializes a new instance of the VintasoftImage class.
    Syntax
    'Declaration
    
    Public Function New( _
    ByVal width
    Width of the image in pixels.
    As System.Int32, _
    ByVal height
    Height of the image in pixels.
    As System.Int32, _
    ByVal pixelFormat
    Pixel format of the image.
    As PixelFormat _
    )
    public VintasoftImage(
    System.Int32 width,
    System.Int32 height,
    PixelFormat pixelFormat
    )
    public: VintasoftImage(
    System.Int32 width,
    System.Int32 height,
    PixelFormat pixelFormat
    )
    public:
    VintasoftImage(
    System.Int32 width,
    System.Int32 height,
    PixelFormat pixelFormat
    )

    Parameters

    width
    Width of the image in pixels.
    height
    Height of the image in pixels.
    pixelFormat
    Pixel format of the image.
    Exceptions
    ExceptionDescription
    Thrown if width or height is 0 or less.
    Example

    This C#/VB.NET code shows how to create an image of the specified size and format.

    
    ' width of image in pixels
    Dim width As Integer = 1000
    ' height of image in pixels
    Dim height As Integer = 1000
    ' create a black-white image
            ' ...
    Using image As New Vintasoft.Imaging.VintasoftImage(width, height, Vintasoft.Imaging.PixelFormat.BlackWhite)
    End Using
    
    
    
    // width of image in pixels
    int width = 1000;
    // height of image in pixels
    int height = 1000;
    // create a black-white image
    using (Vintasoft.Imaging.VintasoftImage image = 
        new Vintasoft.Imaging.VintasoftImage(width, height, 
            Vintasoft.Imaging.PixelFormat.BlackWhite))
    {
        // ...
    }
    
    

    Requirements

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

    See Also