VintaSoft Imaging .NET SDK v8.7
Vintasoft.Imaging Namespace / VintasoftImage Class / VintasoftImage Constructor / VintasoftImage Constructor(ImageSize)
Size of the image.
Example



In This Topic
    VintasoftImage Constructor(ImageSize)
    In This Topic
    Initializes a new instance of the VintasoftImage class.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal size As ImageSize _
    )
    public VintasoftImage( 
       ImageSize size
    )
    public: VintasoftImage( 
       ImageSize* size
    )
    public:
    VintasoftImage( 
       ImageSize^ size
    )

    Parameters

    size
    Size of the image.
    Exceptions
    ExceptionDescription
    Thrown if size is null.
    Example
    This example shows how to create an image of the specified size in millimeters.
    ' width of image in millimeters (15 cm)
    Dim width As Integer = 15 * 10
    ' height of image in millimeters (20 cm)
    Dim height As Integer = 20 * 10
    ' resolution of image
    Dim resolution As Vintasoft.Imaging.Resolution = Vintasoft.Imaging.Resolution.ScreenResolution
    Dim imageSize As Vintasoft.Imaging.ImageSize = Vintasoft.Imaging.ImageSize.FromMillimeters(width, height, resolution)
    ' create an image width size 15x20 cm
    		' ...
    Using image As New Vintasoft.Imaging.VintasoftImage(imageSize)
    End Using
    // width of image in millimeters (15 cm)
    int width = 15 * 10;
    // height of image in millimeters (20 cm)
    int height = 20 * 10;
    // resolution of image
    Vintasoft.Imaging.Resolution resolution = 
        Vintasoft.Imaging.Resolution.ScreenResolution;
    Vintasoft.Imaging.ImageSize imageSize = 
        Vintasoft.Imaging.ImageSize.FromMillimeters(width, height, resolution);
    // create an image width size 15x20 cm
    using (Vintasoft.Imaging.VintasoftImage image = 
        new Vintasoft.Imaging.VintasoftImage(imageSize))
    {
        // ...
    }
    Requirements

    Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also