Table of Contents

Class ImageSettings

Namespace
Dynamicweb.Imaging
Assembly
Dynamicweb.Core.dll

Class with settings used for displaying image information and used when resizing images.

[Serializable]
public class ImageSettings
Inheritance
ImageSettings
Inherited Members

Constructors

ImageSettings()

Initializes a new instance of image settings.

public ImageSettings()

Fields

SettingsFileName

The name of the settings file, "ImageSettings.xml"

public const string SettingsFileName = "ImageSettings.xml"

Field Value

string

Properties

Active

Gets or sets a value indicating whether this ImageSettings is active.

public bool Active { get; set; }

Property Value

bool

true if active; otherwise, false.

ApplySettingsToSubfolders

Gets or sets a value indicating whether [apply settings to subfolders].

public bool ApplySettingsToSubfolders { get; set; }

Property Value

bool

true if [apply settings to subfolders]; otherwise, false.

CropOffset

Gets or sets the crop offset.

public CropMode CropOffset { get; set; }

Property Value

CropMode

The crop offset.

EnforceOutputFormat

Gets or sets a value indicating whether [enforce output format].

public bool EnforceOutputFormat { get; set; }

Property Value

bool

true if [enforce output format]; otherwise, false.

Height

Gets or sets the height.

public int Height { get; set; }

Property Value

int

The height.

ImageOutputFormat

Gets or sets the image output format.

public string? ImageOutputFormat { get; set; }

Property Value

string

The image output format.

ImagePostfix

Gets or sets the image postfix.

public string? ImagePostfix { get; set; }

Property Value

string

The image postfix.

LastApply

Gets or sets the last apply.

public DateTime LastApply { get; set; }

Property Value

DateTime

The last apply.

LimitToTheseExtensions

Gets or sets a value indicating whether [limit to these extensions].

public bool LimitToTheseExtensions { get; set; }

Property Value

bool

true if [limit to these extensions]; otherwise, false.

OverwriteOriginal

Gets or sets a value indicating whether [overwrite original].

public bool OverwriteOriginal { get; set; }

Property Value

bool

true if [overwrite original]; otherwise, false.

ProcessedExtensions

Gets or sets the processed extensions.

public List<string> ProcessedExtensions { get; set; }

Property Value

List<string>

The processed extensions.

Quality

Gets or sets the quality.

public int Quality { get; set; }

Property Value

int

The quality.

ThumbSettings

Gets or sets the thumb settings.

public List<ThumbnailSettings> ThumbSettings { get; set; }

Property Value

List<ThumbnailSettings>

The thumb settings.

Width

Gets or sets the width.

public int Width { get; set; }

Property Value

int

The width.

Methods

Exists(string)

Existses the specified path.

public static bool Exists(string path)

Parameters

path string

The path.

Returns

bool

true if XXXX, false otherwise.

GetResizeSettingsMode(string)

Gets the resize settings mode.

public static ResizeSettingsMode GetResizeSettingsMode(string path)

Parameters

path string

The path.

Returns

ResizeSettingsMode

ResizeSettingsMode.

IsThumbnailFolder(string)

Determines whether [is thumbnail folder] [the specified folder name].

public bool IsThumbnailFolder(string folderName)

Parameters

folderName string

Name of the folder.

Returns

bool

true if [is thumbnail folder] [the specified folder name]; otherwise, false.

Load(string)

Loads the specified path.

public static ImageSettings? Load(string path)

Parameters

path string

The path.

Returns

ImageSettings

ImageSettings.

Load(string, bool)

Loads the specified path.

public static ImageSettings? Load(string path, bool getFromParentIfEmptyOrDisabled)

Parameters

path string

The path.

getFromParentIfEmptyOrDisabled bool

if set to true [get from parent if empty or disabled].

Returns

ImageSettings

ImageSettings.

MakeImage(string, string, string, int, int, int, CropMode)

Creates the image.

public static void MakeImage(string sourceFile, string destinationFile, string extension, int width, int height, int quality, CropMode cropMode)

Parameters

sourceFile string

The source file.

destinationFile string

The destination file.

extension string

The extension.

width int

The width.

height int

The height.

quality int

The quality.

cropMode CropMode

The crope mode.

Save(string, ImageSettings)

Saves the specified path.

public static void Save(string path, ImageSettings settings)

Parameters

path string

The path.

settings ImageSettings

The settings.

To top