Class ImageResizer
Namespace: Aurigma.DesignAtoms.Canvas
Assembly: Aurigma.DesignAtoms.dll
Syntax
public class ImageResizer
Inheritance: System.Object -> ImageResizer
Inherited Members
System.Object.ToStringSystem.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.ReferenceEquals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseClone
Constructors
ImageResizer
public ImageResizer(IConfiguration configuration, IFileCache fileCache, IFontService fontService, IExternalConverter externalConverter, ISvgReaderFactory svgReaderFactory, IGmColorConverter gmColorConverter, IColorManagement colorManagement, Dither? ditheringType = null, float? ditheringAmount = null)
Methods
ConvertPsdToTiff
public static Stream ConvertPsdToTiff(Stream sourceReadStream)
Parameters
| Type | Name | Description |
|---|---|---|
System.IO.Stream | sourceReadStream |
Returns
System.IO.Stream
GraphicsContainerToPipelineElement
public static PipelineElement GraphicsContainerToPipelineElement(IColorManagement colorManagement, GraphicsContainer container, Size destinationSize, ResizeMode resizeMode, CancellationToken cancellationToken = default(CancellationToken), bool skipScale = false, IRenderingColorSettings colorSettings = null, PixelFormat? destinationPixelFormat = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.ColorManagement.IColorManagement | colorManagement | |
Aurigma.GraphicsMill.AdvancedDrawing.GraphicsContainer | container | |
System.Drawing.Size | destinationSize | |
Aurigma.GraphicsMill.Transforms.ResizeMode | resizeMode | |
System.Threading.CancellationToken | cancellationToken | |
System.Boolean | skipScale | |
| Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings | colorSettings | |
System.Nullable<Aurigma.DesignAtoms.Model.Color.PixelFormat> | destinationPixelFormat |
Returns
Aurigma.GraphicsMill.PipelineElement
CalculateScale
public static float CalculateScale(Size source, Size destination)
Parameters
| Type | Name | Description |
|---|---|---|
System.Drawing.Size | source | |
System.Drawing.Size | destination |
Returns
System.Single
GetThumbnail
public Task<string> GetThumbnail(IResizeOptions options, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Canvas.IResizeOptions | options | |
System.Threading.CancellationToken | cancellationToken |
Returns
System.Threading.Tasks.Task<System.String>