IOMiscUtils NormalizeCenteredImage Method NFX Class Library

[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: NFX
Assembly: NFX (in NFX.dll) Version: 3.0.0.1 (3.0.0.1)
Syntax

public static Image NormalizeCenteredImage(
	this Image srcImage,
	int targetWidth = 128,
	int targetHeight = 128,
	int xDpi = 96,
	int yDpi = 96
)

Return Value

Type: OnlineImage

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type OnlineImage. When you use instance method syntax to call this method, omit the first parameter. For more information, see OnlineExtension Methods (Visual Basic) or OnlineExtension Methods (C# Programming Guide).
See Also