Please see the Examples:
SimpleImageUpload uses PopupPictureTrimmer to allow final users to interactively crop and/or resize the uploaded images.
This feature can be controlled by using the following three properties:
The first property (EnableEdit), allows to enable or disable the WYSIWYG image editor.
The default value is true (WYSIWYG image editor enabled)
The second property (AutoOpenImageEditPopupAfterUpload) allows to configure the control so that the image editor popup is automatically opened after the upload process.
The default value is false.
The third property (CropConstraint) allows to:
- Disable the crop feature (so that the image can only be resized, rotated, flipped or color adjusted)
- Configure the type of crop constraint.
In order to disable the crop feature you have to set this property to null (that is also the default value).
In this case the cropping mask is not displayed.
It is important to note that, when the CropConstraint property is valorized the image is always cropped according to the CropConstraint parameters.
This also occurs even if EnableEdit is false.
Moreover it is important to know that the image is always cropped before the PostProcessingFilter is applied.
The following example allows an user to crop a fixed size image (300x200 pixels - by default the whole image is selected)
protected void Page_Load(object sender, EventArgs e)
var cropConstraint = new FixedCropConstraint(300, 200);
cropConstraint.DefaultImageSelectionStrategy = CropConstraintImageSelectionStrategy.WholeImage;
ImageUpload1.CropConstraint = cropConstraint;
Please see also: Interactively crop and/or resize an image.
Piczard Foundamentals - Web
Interactively crop and/or resize an image