ImageGear v26.5 - Updated
ImageGear.Core Assembly / ImageGear.Processing Namespace / ImGearProcessing Class / ResizeCanvas Method
Image to resize.
New image width.
New image height.
X offset at which to put left top corner of the image after resize.
Y offset at which to put left top corner of the image after resize.
Background color to fill the out of picture area; null (Nothing in VB NET) results in black background.




In This Topic
    ResizeCanvas Method
    In This Topic
    This method changes the dimensions of the ImageGear.Core.ImGearPage class object.
    Syntax
    'Declaration
     
    Public Shared Sub ResizeCanvas( _
       ByVal page As ImGearPage, _
       ByVal width As Integer, _
       ByVal height As Integer, _
       ByVal offsetX As Integer, _
       ByVal offsetY As Integer, _
       ByVal background As ImGearPixel _
    ) 
    'Usage
     
    Dim page As ImGearPage
    Dim width As Integer
    Dim height As Integer
    Dim offsetX As Integer
    Dim offsetY As Integer
    Dim background As ImGearPixel
     
    ImGearProcessing.ResizeCanvas(page, width, height, offsetX, offsetY, background)
    public static void ResizeCanvas( 
       ImGearPage page,
       int width,
       int height,
       int offsetX,
       int offsetY,
       ImGearPixel background
    )
    public: static void ResizeCanvas( 
       ImGearPage* page,
       int width,
       int height,
       int offsetX,
       int offsetY,
       ImGearPixel* background
    ) 
    public:
    static void ResizeCanvas( 
       ImGearPage^ page,
       int width,
       int height,
       int offsetX,
       int offsetY,
       ImGearPixel^ background
    ) 

    Parameters

    page
    Image to resize.
    width
    New image width.
    height
    New image height.
    offsetX
    X offset at which to put left top corner of the image after resize.
    offsetY
    Y offset at which to put left top corner of the image after resize.
    background
    Background color to fill the out of picture area; null (Nothing in VB NET) results in black background.
    Remarks
    The image data in the bitmap is not stretched or compressed, but copied to the specified offset in the new image.

    Use ImGearProcessingVerifier.CanApplyResizeCanvas method to check whether the operation can be performed on the specified image.

    See Also