VintaSoft Imaging .NET SDK 12.4: Documentation for .NET developer
Vintasoft.Imaging Namespace / VintasoftImage Class / Resize(Int32,Int32) Method
Syntax Remarks Example Requirements SeeAlso
In This Topic
    Resize(Int32,Int32) Method (VintasoftImage)
    In This Topic
    Resizes this image.
    Syntax
    'Declaration
    
    Public Sub Resize( _
    ByVal width
    New image width, in pixels.
    As System.Int32, _
    ByVal height
    New image height, in pixels.
    As System.Int32 _
    )
    public void Resize(
    System.Int32 width,
    System.Int32 height
    )
    public: void Resize(
    System.Int32 width,
    System.Int32 height
    )
    public:
    void Resize(
    System.Int32 width,
    System.Int32 height
    )

    Parameters

    width
    New image width, in pixels.
    height
    New image height, in pixels.
    Remarks

    This method works synchronously, use the ResizeCommand if you need to resize image asynchronously with progress indicator.

    Example

    This C#/VB.NET code shows how to load image from disk, resize it and save to file.

    
    ' load image from file
    Using image As New Vintasoft.Imaging.VintasoftImage("c:\original-image.tif")
        ' resize image
        image.Resize(400, 300)
        ' save processed image to file
        image.Save("c:\processed-image.tif")
    End Using
    
    
    
    // load image from file
    using (Vintasoft.Imaging.VintasoftImage image =
        new Vintasoft.Imaging.VintasoftImage(@"c:\original-image.tif"))
    {
        // resize image
        image.Resize(400, 300);
        // save processed image to file
        image.Save(@"c:\processed-image.tif");
    }
    
    

    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