Enum CropMode
- Namespace
- Dynamicweb.Imaging.ImageHandling
- Assembly
- Dynamicweb.Core.dll
Defines how images are cropped when resized
public enum CropMode
Fields
Center = 0
Centers the cropping around the center of the image
CenterOrFocal = 7
Centers the cropping around the center of the image or the specified focal point specified in FocalPointX and FocalPointY
Focal points are relative indexes from the center of the image - the center being 0,0. Negative numbers are left and down. Negative FocalPointY is down from the center, positive is up from the center. Negative FocalPointX is left of the center, positive is right of the center. Maximum value is 100, minimum value is -100
Fit = 6
The image is not cropped but resized to fit inside the box specified with the width and height paramteres stretching the original image to fit
KeepAspectRatio = 5
The image is not cropped but resized to fit inside the box specified with the width and height paramteres respecting the original image aspect ratio
If only width or height is specified, the image is resized to that height or width keeping aspect ratio of the original image.
LowerLeft = 1
Crops the image including as much as posssible from lower left corner of the image
LowerRight = 4
Crops the image including as much as posssible from lower right corner of the image
UpperLeft = 2
Crops the image including as much as posssible from upper left corner of the image
UpperRight = 3
Crops the image including as much as posssible from upper right corner of the image