[This is preliminary documentation and is subject to change.]
Scales source image so it fits in the desired image size preserving aspect ratio.
This function is usable for profile picture size/aspect normalization
Namespace: NFXAssembly: NFX (in NFX.dll) Version: 3.0.0.1 (3.0.0.1)
public static Image NormalizeCenteredImage(
this Image srcImage,
int targetWidth = 128,
int targetHeight = 128,
int xDpi = 96,
int yDpi = 96
)
public static Image NormalizeCenteredImage(
this Image srcImage,
int targetWidth = 128,
int targetHeight = 128,
int xDpi = 96,
int yDpi = 96
)
<ExtensionAttribute>
Public Shared Function NormalizeCenteredImage (
srcImage As Image,
Optional targetWidth As Integer = 128,
Optional targetHeight As Integer = 128,
Optional xDpi As Integer = 96,
Optional yDpi As Integer = 96
) As Image
<ExtensionAttribute>
Public Shared Function NormalizeCenteredImage (
srcImage As Image,
Optional targetWidth As Integer = 128,
Optional targetHeight As Integer = 128,
Optional xDpi As Integer = 96,
Optional yDpi As Integer = 96
) As Image
public:
[ExtensionAttribute]
static Image^ NormalizeCenteredImage(
Image^ srcImage,
int targetWidth = 128,
int targetHeight = 128,
int xDpi = 96,
int yDpi = 96
)
public:
[ExtensionAttribute]
static Image^ NormalizeCenteredImage(
Image^ srcImage,
int targetWidth = 128,
int targetHeight = 128,
int xDpi = 96,
int yDpi = 96
)
static member NormalizeCenteredImage :
srcImage : Image *
?targetWidth : int *
?targetHeight : int *
?xDpi : int *
?yDpi : int
(* Defaults:
let _targetWidth = defaultArg targetWidth 128
let _targetHeight = defaultArg targetHeight 128
let _xDpi = defaultArg xDpi 96
let _yDpi = defaultArg yDpi 96
*)
-> Image
static member NormalizeCenteredImage :
srcImage : Image *
?targetWidth : int *
?targetHeight : int *
?xDpi : int *
?yDpi : int
(* Defaults:
let _targetWidth = defaultArg targetWidth 128
let _targetHeight = defaultArg targetHeight 128
let _xDpi = defaultArg xDpi 96
let _yDpi = defaultArg yDpi 96
*)
-> Image
Return Value
Type:
ImageUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Image. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).