Class ImageEditor
- Namespace
- Dynamicweb.Imaging
- Assembly
- Dynamicweb.Core.dll
Utility which is used to apply color changes and transformations to images.
public class ImageEditor
- Inheritance
-
ImageEditor
- Inherited Members
Properties
ImageBitDepth
Bit depth
public int ImageBitDepth { get; set; }
Property Value
ImageColors
Number of colors
public int ImageColors { get; set; }
Property Value
ImagePreview
Preview
public bool ImagePreview { get; set; }
Property Value
ImageQuality
Quality (0-100)
public int ImageQuality { get; set; }
Property Value
ImageType
Type of image
public ImageType ImageType { get; set; }
Property Value
Methods
ActionCrop(string, int, int, int, int)
Applies cropping to an image.
public void ActionCrop(string filePath, int left, int top, int right, int bottom)
Parameters
filePath
stringAbsolute file path.
left
intPosition of cropping from the left.
top
intPosition of cropping from the top.
right
intPosition of cropping from the right.
bottom
intPosition of cropping from the bottom.
ActionEffectBlackAndWhite(string)
Change image colors to back and white.
public void ActionEffectBlackAndWhite(string filePath)
Parameters
filePath
stringAbsolute file path.
ActionEffectColorCorrection(string, int, int, int)
Change image colors based on contrast, brightness and saturation.
public void ActionEffectColorCorrection(string filePath, int contrast, int brightness, int saturation)
Parameters
filePath
stringAbsolute file path.
contrast
intColor contrast.
brightness
intColor brightness.
saturation
intColor saturation.
ActionEffectGrayscale(string)
Change image colors to grayscale.
public void ActionEffectGrayscale(string filePath)
Parameters
filePath
stringAbsolute file path.
ActionEffectNegative(string)
Change image colors to negative.
public void ActionEffectNegative(string filePath)
Parameters
filePath
stringAbsolute file path.
ActionEffectSepia(string)
Change image colors to sepia.
public void ActionEffectSepia(string filePath)
Parameters
filePath
stringAbsolute file path.
ActionFlipHorizontal(string)
Flip the image horizontally (x-axis).
public void ActionFlipHorizontal(string filePath)
Parameters
filePath
stringAbsolute file path.
ActionFlipVertical(string)
Flip the image vertically (y-axis).
public void ActionFlipVertical(string filePath)
Parameters
filePath
stringAbsolute file path.
ActionReset(string)
Cancel any changes and revert to the original image.
public void ActionReset(string filePath)
Parameters
filePath
string
ActionResize(string, int, int, bool)
Resizes an image.
public void ActionResize(string filePath, int width, int height, bool maintainAspectRatio)
Parameters
filePath
stringAbsolute file path.
width
intMaximum image width.
height
intMaximum image height.
maintainAspectRatio
boolWhether the rezising should maintain the aspect ratio of the original image.
ActionRotate180(string)
Rotate the image 90 degrees.
public void ActionRotate180(string filePath)
Parameters
filePath
stringAbsolute file path.
ActionRotate90(string)
Rotate the image 90 degrees.
public void ActionRotate90(string filePath)
Parameters
filePath
stringAbsolute file path.
ActionRotate90CounterClockwise(string)
Rotate the image 90 degrees counterclockwise.
public void ActionRotate90CounterClockwise(string filePath)
Parameters
filePath
stringAbsolute file path
ActionSave(string, string)
Saves an image.
public void ActionSave(string sourceFilePath, string destinationFilePath)
Parameters
sourceFilePath
stringAbsolute path to source file.
destinationFilePath
stringAbsolute path to destination file.
CopyImageFile(string, string)
Copies an image file from soure path to detination path
public void CopyImageFile(string sourceFilePath, string destinationFilePath)
Parameters
GetImageTypeFromFile(string)
Get image type by file name
public static ImageType GetImageTypeFromFile(string filePath)
Parameters
filePath
stringThe image file path