Interface IImageProcessor
Interface IImageProcessor
Namespace: MediaBrowser.Controller.Drawing
Assembly: MediaBrowser.Controller.dll
Syntax
public interface IImageProcessor
Properties
ImageEncoders
Declaration
IImageEncoder[] ImageEncoders { get; }
Property Value
Type | Description |
---|---|
IImageEncoder[] |
ImageEnhancers
Gets the image enhancers.
Declaration
IImageEnhancer[] ImageEnhancers { get; }
Property Value
Type | Description |
---|---|
IImageEnhancer[] | The image enhancers. |
SupportedFileExtensions
Gets the supported input formats.
Declaration
string[] SupportedFileExtensions { get; }
Property Value
Type | Description |
---|---|
System.String[] | The supported input formats. |
SupportsImageCollageCreation
Gets a value indicating whether [supports image collage creation].
Declaration
bool SupportsImageCollageCreation { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
AddParts(IEnumerable<IImageEnhancer>)
Adds the parts.
Declaration
void AddParts(IEnumerable<IImageEnhancer> enhancers)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IImageEnhancer> | enhancers | The enhancers. |
CreateImageCollage(ImageCollageOptions, CancellationToken)
Creates the image collage.
Declaration
Task CreateImageCollage(ImageCollageOptions options, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ImageCollageOptions | options | The options. |
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
FileSupportsTransparency(String)
Declaration
bool FileSupportsTransparency(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path |
Returns
Type | Description |
---|---|
System.Boolean |
GetEnhancedImage(BaseItem, ImageType, Int32, CancellationToken)
Gets the enhanced image.
Declaration
Task<string> GetEnhancedImage(BaseItem item, ImageType imageType, int imageIndex, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
BaseItem | item | The item. |
ImageType | imageType | Type of the image. |
System.Int32 | imageIndex | Index of the image. |
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | Task{System.String}. |
GetImageCacheTag(BaseItem, ItemImageInfo)
Gets the image cache tag.
Declaration
string GetImageCacheTag(BaseItem item, ItemImageInfo image)
Parameters
Type | Name | Description |
---|---|---|
BaseItem | item | The item. |
ItemImageInfo | image | The image. |
Returns
Type | Description |
---|---|
System.String |
GetImageCacheTag(ItemImageInfo)
Declaration
string GetImageCacheTag(ItemImageInfo image)
Parameters
Type | Name | Description |
---|---|---|
ItemImageInfo | image |
Returns
Type | Description |
---|---|
System.String |
GetImageCacheTag(Int64, ChapterInfo)
Declaration
string GetImageCacheTag(long itemId, ChapterInfo chapter)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | itemId | |
ChapterInfo | chapter |
Returns
Type | Description |
---|---|
System.String |
GetImageData(String)
Declaration
ImageData GetImageData(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path |
Returns
Type | Description |
---|---|
ImageData |
GetImageSize(BaseItem, ItemImageInfo)
Gets the size of the image.
Declaration
(ImageSize, ImageOrientation? ) GetImageSize(BaseItem item, ItemImageInfo info)
Parameters
Type | Name | Description |
---|---|---|
BaseItem | item | The item. |
ItemImageInfo | info | The information. |
Returns
Type | Description |
---|---|
System.ValueTuple<ImageSize, System.Nullable<ImageOrientation>> | ImageSize. |
GetImageSize(String)
Declaration
ImageSize GetImageSize(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path |
Returns
Type | Description |
---|---|
ImageSize |
GetSupportedEnhancers(BaseItem, ImageType)
Gets the supported enhancers.
Declaration
IImageEnhancer[] GetSupportedEnhancers(BaseItem item, ImageType imageType)
Parameters
Type | Name | Description |
---|---|---|
BaseItem | item | The item. |
ImageType | imageType | Type of the image. |
Returns
Type | Description |
---|---|
IImageEnhancer[] |
GetSupportedImage(ItemImageInfo, IImageEncoder)
Declaration
string GetSupportedImage(ItemImageInfo originalImage, IImageEncoder imageEncoder)
Parameters
Type | Name | Description |
---|---|---|
ItemImageInfo | originalImage | |
IImageEncoder | imageEncoder |
Returns
Type | Description |
---|---|
System.String |
GetSupportedImageOutputFormats()
Gets the supported image output formats.
Declaration
ImageFormat[] GetSupportedImageOutputFormats()
Returns
Type | Description |
---|---|
ImageFormat[] | ImageOutputFormat[]. |
OnImageSizeObtained(ImageProcessingOptions, ImageSize, Nullable<ImageOrientation>)
Declaration
void OnImageSizeObtained(ImageProcessingOptions options, ImageSize size, ImageOrientation? orientation)
Parameters
Type | Name | Description |
---|---|---|
ImageProcessingOptions | options | |
ImageSize | size | |
System.Nullable<ImageOrientation> | orientation |
ProcessImage(ImageProcessingOptions, Stream, CancellationToken)
Processes the image.
Declaration
Task ProcessImage(ImageProcessingOptions options, Stream toStream, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ImageProcessingOptions | options | |
System.IO.Stream | toStream | |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ProcessImage(ImageProcessingOptions, CancellationToken)
Processes the image.
Declaration
Task<Tuple<string, string, DateTimeOffset>> ProcessImage(ImageProcessingOptions options, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ImageProcessingOptions | options | The options. |
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Tuple<System.String, System.String, System.DateTimeOffset>> | Task. |
SetImageEncoders(List<IImageEncoder>)
Declaration
void SetImageEncoders(List<IImageEncoder> imageEncoders)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<IImageEncoder> | imageEncoders |