Version

CreateScaledImage Method

Creates a new image using a scaled portion of the original image.
Syntax
'Declaration
 
Public Shared Function CreateScaledImage( _
   ByVal original As Image, _
   ByVal destinationSize As Size, _
   ByVal srcRect As Rectangle _
) As Image
public static Image CreateScaledImage( 
   Image original,
   Size destinationSize,
   Rectangle srcRect
)

Parameters

original
Original image containing the image area to scale
destinationSize
Size of the new bitmap
srcRect
Portion of the original image to scale

Return Value

A new bitmap or null if there was no portion of the original to scale
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also