Table of Contents

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

int

ImageColors

Number of colors

public int ImageColors { get; set; }

Property Value

int

ImagePreview

Preview

public bool ImagePreview { get; set; }

Property Value

bool

ImageQuality

Quality (0-100)

public int ImageQuality { get; set; }

Property Value

int

ImageType

Type of image

public ImageType ImageType { get; set; }

Property Value

ImageType

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 string

Absolute file path.

left int

Position of cropping from the left.

top int

Position of cropping from the top.

right int

Position of cropping from the right.

bottom int

Position of cropping from the bottom.

ActionEffectBlackAndWhite(string)

Change image colors to back and white.

public void ActionEffectBlackAndWhite(string filePath)

Parameters

filePath string

Absolute 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 string

Absolute file path.

contrast int

Color contrast.

brightness int

Color brightness.

saturation int

Color saturation.

ActionEffectGrayscale(string)

Change image colors to grayscale.

public void ActionEffectGrayscale(string filePath)

Parameters

filePath string

Absolute file path.

ActionEffectNegative(string)

Change image colors to negative.

public void ActionEffectNegative(string filePath)

Parameters

filePath string

Absolute file path.

ActionEffectSepia(string)

Change image colors to sepia.

public void ActionEffectSepia(string filePath)

Parameters

filePath string

Absolute file path.

ActionFlipHorizontal(string)

Flip the image horizontally (x-axis).

public void ActionFlipHorizontal(string filePath)

Parameters

filePath string

Absolute file path.

ActionFlipVertical(string)

Flip the image vertically (y-axis).

public void ActionFlipVertical(string filePath)

Parameters

filePath string

Absolute 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 string

Absolute file path.

width int

Maximum image width.

height int

Maximum image height.

maintainAspectRatio bool

Whether 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 string

Absolute file path.

ActionRotate90(string)

Rotate the image 90 degrees.

public void ActionRotate90(string filePath)

Parameters

filePath string

Absolute file path.

ActionRotate90CounterClockwise(string)

Rotate the image 90 degrees counterclockwise.

public void ActionRotate90CounterClockwise(string filePath)

Parameters

filePath string

Absolute file path

ActionSave(string, string)

Saves an image.

public void ActionSave(string sourceFilePath, string destinationFilePath)

Parameters

sourceFilePath string

Absolute path to source file.

destinationFilePath string

Absolute 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

sourceFilePath string

Source file path

destinationFilePath string

Destination file path

GetImageTypeFromFile(string)

Get image type by file name

public static ImageType GetImageTypeFromFile(string filePath)

Parameters

filePath string

The image file path

Returns

ImageType
To top