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