Table of Contents

Class ConvertParameters

Namespace
Dynamicweb.Imaging.ImageHandling
Assembly
Dynamicweb.Core.dll

The Class ConvertParameters represents conversion parameters.

public class ConvertParameters
Inheritance
ConvertParameters
Inherited Members

Constructors

ConvertParameters()

Creates new instance of this class.

public ConvertParameters()

ConvertParameters(string)

Creates new instance of this class.

public ConvertParameters(string sourceFile)

Parameters

sourceFile string

The virtual path to the image to be converted.

Properties

BackgroundColor

Gets or sets the background color

public Color BackgroundColor { get; set; }

Property Value

Color

CacheFolder

Gets the path to the cache folder.

public string CacheFolder { get; }

Property Value

string

Virtual path to the cache folder.

ColorDepth

Gets or sets the color depth of the file to be converted.

public int ColorDepth { get; set; }

Property Value

int

ColorMode

Gets or sets the color mode of the file to be converted.

public ColorMode ColorMode { get; set; }

Property Value

ColorMode

ColorProfile

Gets or sets color profile. The value can be set: "auto", "standard", "device", or a physical path to a color profile file on the web server.

public string? ColorProfile { get; set; }

Property Value

string

ColorProfileFolder

Gets or sets the folder for locating the ICC profile.

public string? ColorProfileFolder { get; set; }

Property Value

string

CropMode

Gets or sets the cropping mode of the file to be converted.

public CropMode CropMode { get; set; }

Property Value

CropMode

DoNotResize

Gets or sets the value which indicates whether to resize image or not in case if height or width exceed original image size.

public bool DoNotResize { get; set; }

Property Value

bool

EmbedColorProfile

Gets or sets the value which indicates whether to embed color profile from the original image.

public bool EmbedColorProfile { get; set; }

Property Value

bool

FileData

Gets or sets the contents of a file to be processed.

public byte[]? FileData { get; set; }

Property Value

byte[]

The contents of a file to be processed.

FillCanvas

Defines if canvas should be filled for matching cropmodes (fx. cropmode 5).

public bool FillCanvas { get; set; }

Property Value

bool

FocalPointX

Gets or sets the x-axis of the focal point. Used to find what part of the image should be in center. Focal points are relative indexes from the center of the image - the center being 0,0. Negative numbers are left and down. Negative FocalPointX is left of the center, positive is right of the center. Maximum value is 100, minimum value is -100

public int FocalPointX { get; set; }

Property Value

int

FocalPointY

Gets or sets the y-axis of the focal point. Used to find what part of the image should be in center. 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. Maximum value is 100, minimum value is -100

public int FocalPointY { get; set; }

Property Value

int

Format

Gets or sets the format of the file to be converted.

public OutputFormat Format { get; set; }

Property Value

OutputFormat

Height

Gets or sets the height of the file to be converted.

public int Height { get; set; }

Property Value

int

Quality

Gets or sets the quality of the file to be converted.

public int Quality { get; set; }

Property Value

int

Ratio

Gets or sets the image aspect ratio.

public double? Ratio { get; set; }

Property Value

double?

The ratio as either a decimal number (e.g. a ratio of 16/9 is 2.33).

Remarks

A value above 1 means the image is wider than it is tall. A value lover than 1 means the image is taller than it is wide.

Resolution

Gets or sets the resolution of the file to be converted.

public int Resolution { get; set; }

Property Value

int

SourceFile

Gets or sets the virtual path of the source file.

public string SourceFile { get; set; }

Property Value

string

TargetFile

Gets or sets the name of the conversion result.

public string TargetFile { get; set; }

Property Value

string

UseCache

Defines if the cache is going to be used.

public bool UseCache { get; set; }

Property Value

bool

Width

Gets or sets the width of the file to be converted.

public int Width { get; set; }

Property Value

int

Methods

GetHash()

Retrieves the hash string representing the state of this object.

public string GetHash()

Returns

string

GetHash(bool)

Retrieves the hash string representing the state of this object.

public string GetHash(bool includeLastModified)

Parameters

includeLastModified bool

Returns

string

GetOutputFileName()

Gets the name of the output file.

public string GetOutputFileName()

Returns

string

GetResizeParameters(int, int)

Gets the values used for resizing and cropping.

public ResizeParameters GetResizeParameters(int originalWidth, int originalHeight)

Parameters

originalWidth int

Width of the original image.

originalHeight int

Height of the original image.

Returns

ResizeParameters
To top