This documentation is for the old version. Go to the latest Upload Suite docs

ImageEditor.CropRatio Property

Supported browsers: Internet ExplorerFirefoxGoogle ChromeSafari

Gets or sets an aspect ratio of the crop rectangle.

Namespace: Aurigma.ImageUploader
Assembly: Aurigma.ImageUploader (in Aurigma.ImageUploader.dll)

Syntax

Visual Basic
Public Property CropRatio As String
C#
public string CropRatio { get; set; }

Property Value

Type: System.String

The aspect ratio of the crop rectangle. If empty string no aspect ratio is given.

Default value is "".

Remarks

Crop ratio is width-to-height, thus, property value should be greater than 1 to get landscape orientation and lesser than 1 to get portrait. For example, if you set 0.75 as the property value, it will result in portrait with 3:4 aspect ratio.

You can restrict users from changing the aspect ratio by adding "; fixed" to the value. For example, the following value: "4:3; fixed" sets the 4:3 aspect ratio, which cannot be chaged by users.

See Also

Reference