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
Properties
Active
Gets or sets a value indicating whether this ImageSettings is active.
public bool Active { get; set; }
Property Value
- bool
trueif active; otherwise,false.
ApplySettingsToSubfolders
Gets or sets a value indicating whether [apply settings to subfolders].
public bool ApplySettingsToSubfolders { get; set; }
Property Value
- bool
trueif [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
trueif [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
trueif [limit to these extensions]; otherwise,false.
OverwriteOriginal
Gets or sets a value indicating whether [overwrite original].
public bool OverwriteOriginal { get; set; }
Property Value
- bool
trueif [overwrite original]; otherwise,false.
ProcessedExtensions
Gets or sets the processed extensions.
public List<string> ProcessedExtensions { get; set; }
Property Value
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
pathstringThe path.
Returns
- bool
trueif XXXX,falseotherwise.
GetResizeSettingsMode(string)
Gets the resize settings mode.
public static ResizeSettingsMode GetResizeSettingsMode(string path)
Parameters
pathstringThe path.
Returns
- ResizeSettingsMode
ResizeSettingsMode.
IsThumbnailFolder(string)
Determines whether [is thumbnail folder] [the specified folder name].
public bool IsThumbnailFolder(string folderName)
Parameters
folderNamestringName of the folder.
Returns
- bool
trueif [is thumbnail folder] [the specified folder name]; otherwise,false.
Load(string)
Loads the specified path.
public static ImageSettings? Load(string path)
Parameters
pathstringThe path.
Returns
- ImageSettings
ImageSettings.
Load(string, bool)
Loads the specified path.
public static ImageSettings? Load(string path, bool getFromParentIfEmptyOrDisabled)
Parameters
pathstringThe path.
getFromParentIfEmptyOrDisabledboolif 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
sourceFilestringThe source file.
destinationFilestringThe destination file.
extensionstringThe extension.
widthintThe width.
heightintThe height.
qualityintThe quality.
cropModeCropModeThe crope mode.
Save(string, ImageSettings)
Saves the specified path.
public static void Save(string path, ImageSettings settings)
Parameters
pathstringThe path.
settingsImageSettingsThe settings.