VintaSoft Twain .NET SDK 15.1: Documentation for .NET developer
Vintasoft.WinTwain Namespace / AcquiredImage Class / ResizeCanvas(Int32,Int32,TwainBorderColor,Int32,Int32) Method
Syntax Exceptions Example Requirements SeeAlso
In This Topic
    ResizeCanvas(Int32,Int32,TwainBorderColor,Int32,Int32) Method (AcquiredImage)
    In This Topic
    Changes size of image canvas.
    Syntax
    'Declaration
    
    Public Function ResizeCanvas( _
    ByVal canvasWidth
    Width of the image canvas.
    As Integer, _
    ByVal canvasHeight
    Height of the image canvas.
    As Integer, _
    ByVal canvasColor
    Color of the image canvas.
    As Vintasoft.WinTwain.ImageProcessing.TwainBorderColor, _
    ByVal imageXPosition
    X position of the original image within new image.
    As Integer, _
    ByVal imageYPosition
    Y position of the original image within new image.
    As Integer _
    ) As Boolean

    Parameters

    canvasWidth
    Width of the image canvas.
    canvasHeight
    Height of the image canvas.
    canvasColor
    Color of the image canvas.
    imageXPosition
    X position of the original image within new image.
    imageYPosition
    Y position of the original image within new image.

    Return Value

    true if the image canvas is changed; false if the image canvas is not changed.
    Exceptions
    ExceptionDescription
    Thrown if image size is bigger than canvas size OR image is outside of canvas.
    Example

    Please see example here: AcquiredImage.

    Requirements

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

    See Also