TransformationOptions
Namespace: MJCZone.MediaMatic.AspNetCore.Transformations
Assembly: MJCZone.MediaMatic.AspNetCore
Summary
Options for URL-based image transformations.
public
Contents
Constructors (1) | Methods (5) | Properties (14)
Constructors
TransformationOptions
TransformationOptions()Methods
ToImageProcessingOptions
Converts transformation options to ImageProcessingOptions for the core library.
ImageProcessingOptions ToImageProcessingOptions(ImageFormat} resolvedFormat)Parameters
- resolvedFormat (ImageFormat}) - The resolved image format (if Auto was selected).
Returns
Type: ImageProcessingOptions
Image processing options.
GetType
GetType()ToString
ToString()Equals
Equals()GetHashCode
GetHashCode()Properties
Width
Gets or sets the target width in pixels.
Type: int?
Height
Gets or sets the target height in pixels.
Type: int?
AspectRatio
Gets or sets the aspect ratio (width/height). Used to calculate missing dimension when only width or height is specified.
Type: float?
DevicePixelRatio
Gets or sets the device pixel ratio for high-density displays. Applied to width and height (e.g., dpr_2 doubles dimensions).
Type: float?
CropMode
Gets or sets the resize mode (fit, fill, cover, pad, stretch).
Type: ResizeMode?
Gravity
Gets or sets the gravity mode for cropping.
Type: GravityMode?
FocalPointX
Gets or sets the focal point X coordinate (0.0-1.0). Used when Gravity is Custom.
Type: float?
FocalPointY
Gets or sets the focal point Y coordinate (0.0-1.0). Used when Gravity is Custom.
Type: float?
FocalPoint
Gets or sets the focal point for smart cropping. Built from FocalPointX and FocalPointY when Gravity is Custom.
Type: FocalPoint?
Quality
Gets or sets the quality (0-100). Null means auto-optimize.
Type: int?
Format
Gets or sets the output format (auto, jpeg, png, webp, avif, etc.).
Type: ImageFormatOption?
BackgroundColor
Gets or sets the background color for padding (hex format). Default is white (#FFFFFF).
Type: string
PreserveMetadata
Gets or sets a value indicating whether to preserve metadata.
Type: bool?
Version
Gets or sets the version identifier for cache busting.
Type: string?