VintaSoft Twain .NET SDK v10.2
ResizeCanvas Method (AcquiredImage)




Vintasoft.WpfTwain Namespace > AcquiredImage Class : ResizeCanvas Method
Width of the image canvas.
Height of the image canvas.
Color of the image canvas.
X position of the original image within new image.
Y position of the original image within new image.
Changes size of image canvas.
Syntax
'Declaration
 
Public Function ResizeCanvas( _
   ByVal canvasWidth As Integer, _
   ByVal canvasHeight As Integer, _
   ByVal canvasColor As BorderColor, _
   ByVal imageXPosition As Integer, _
   ByVal imageYPosition As Integer _
) As Boolean
'Usage
 
Dim instance As AcquiredImage
Dim canvasWidth As Integer
Dim canvasHeight As Integer
Dim canvasColor As BorderColor
Dim imageXPosition As Integer
Dim imageYPosition As Integer
Dim value As Boolean
 
value = instance.ResizeCanvas(canvasWidth, canvasHeight, canvasColor, imageXPosition, imageYPosition)
public bool ResizeCanvas( 
   int canvasWidth,
   int canvasHeight,
   BorderColor canvasColor,
   int imageXPosition,
   int imageYPosition
)
public: bool ResizeCanvas( 
   int canvasWidth,
   int canvasHeight,
   BorderColor canvasColor,
   int imageXPosition,
   int imageYPosition
) 
public:
bool ResizeCanvas( 
   int canvasWidth,
   int canvasHeight,
   BorderColor canvasColor,
   int imageXPosition,
   int imageYPosition
) 

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.
Requirements

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

See Also

Reference

AcquiredImage Class
AcquiredImage Members