mirror of https://github.com/abpframework/abp.git
22 changed files with 75 additions and 46 deletions
@ -0,0 +1,14 @@ |
|||
using System.IO; |
|||
using System.Threading; |
|||
using System.Threading.Tasks; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.Image; |
|||
|
|||
public interface IImageCompressorManager // TODO: Rename to IImageCompressor
|
|||
{ |
|||
Task<Stream> CompressAsync( |
|||
Stream stream, |
|||
[CanBeNull] IImageFormat imageFormat = null, |
|||
CancellationToken cancellationToken = default); |
|||
} |
|||
@ -1,6 +1,6 @@ |
|||
namespace Volo.Abp.Image; |
|||
|
|||
public interface IImageCompressorSelector |
|||
public interface IImageCompressorSelector //TODO: Remove, merge to IImageCompressorManager
|
|||
{ |
|||
IImageCompressor FindCompressor(IImageFormat imageFormat); |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
namespace Volo.Abp.Image; |
|||
|
|||
public class ImageResizeArgs : IImageResizeParameter |
|||
{ |
|||
public int? Width { get; set; } |
|||
|
|||
public int? Height { get; set; } |
|||
|
|||
public ImageResizeMode? Mode { get; set; } //TODO: Set default here
|
|||
|
|||
public ImageResizeArgs(int? width = null, int? height = null, ImageResizeMode? mode = null) |
|||
{ |
|||
Mode = mode; |
|||
Width = width; |
|||
Height = height; |
|||
|
|||
//TODO: Throw exception if width/height is not null and negative
|
|||
} |
|||
} |
|||
@ -1,15 +0,0 @@ |
|||
namespace Volo.Abp.Image; |
|||
|
|||
public class ImageResizeParameter : IImageResizeParameter |
|||
{ |
|||
public ImageResizeParameter(int? width = null, int? height = null, ImageResizeMode? mode = null) |
|||
{ |
|||
Mode = mode; |
|||
Width = width; |
|||
Height = height; |
|||
} |
|||
|
|||
public int? Width { get; set; } |
|||
public int? Height { get; set; } |
|||
public ImageResizeMode? Mode { get; set; } |
|||
} |
|||
Loading…
Reference in new issue