scale an image based on existing dimensions and updated requirement

Namespace: DotNetNuke.Common.Utilities
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public static Size NewImageSize(
	int currentWidth,
	int currentHeight,
	int newWidth,
	int newHeight
)
Visual Basic
Public Shared Function NewImageSize ( 
	currentWidth As Integer,
	currentHeight As Integer,
	newWidth As Integer,
	newHeight As Integer
) As Size

Parameters

currentWidth
Type: System..::..Int32
current width
currentHeight
Type: System..::..Int32
current height
newWidth
Type: System..::..Int32
new width
newHeight
Type: System..::..Int32
new height

Return Value

updated calculated height/width minesions

See Also