ImageHelper EnsureImageDimensions Method (Int32, Int32, Int32, Int32, Int32)Kentico 8.0 API Reference
Computes new image dimensions according to the specified parameters, and returns it.

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 8.0.0.0 (8.0.5239.26125)

Return Value

Type:  OnlineInt32 
An array with computed width ([0]) and height ([1])
Remarks

This method prevents image enlargement. Both image width and image height must be positive integers, otherwise specified image dimensions are returned. Specified image dimensions are also returned when neither width, height or maxSideSize is a positive integer.
See Also