mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 22:08:27 +01:00
Added image output format param
This commit is contained in:
@@ -73,22 +73,9 @@ namespace MediaBrowser.Controller.Drawing
|
||||
/// <summary>
|
||||
/// Processes the image.
|
||||
/// </summary>
|
||||
/// <param name="entity">The entity.</param>
|
||||
/// <param name="imageType">Type of the image.</param>
|
||||
/// <param name="imageIndex">Index of the image.</param>
|
||||
/// <param name="originalImagePath">The original image path.</param>
|
||||
/// <param name="cropWhitespace">if set to <c>true</c> [crop whitespace].</param>
|
||||
/// <param name="dateModified">The date modified.</param>
|
||||
/// <param name="options">The options.</param>
|
||||
/// <param name="toStream">To stream.</param>
|
||||
/// <param name="width">The width.</param>
|
||||
/// <param name="height">The height.</param>
|
||||
/// <param name="maxWidth">Width of the max.</param>
|
||||
/// <param name="maxHeight">Height of the max.</param>
|
||||
/// <param name="quality">The quality.</param>
|
||||
/// <param name="enhancers">The enhancers.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task ProcessImage(BaseItem entity, ImageType imageType, int imageIndex, string originalImagePath, bool cropWhitespace,
|
||||
DateTime dateModified, Stream toStream, int? width, int? height, int? maxWidth, int? maxHeight,
|
||||
int? quality, List<IImageEnhancer> enhancers);
|
||||
Task ProcessImage(ImageProcessingOptions options, Stream toStream);
|
||||
}
|
||||
}
|
||||
|
||||
46
MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs
Normal file
46
MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.Drawing
|
||||
{
|
||||
public class ImageProcessingOptions
|
||||
{
|
||||
public BaseItem Item { get; set; }
|
||||
|
||||
public ImageType ImageType { get; set; }
|
||||
|
||||
public int ImageIndex { get; set; }
|
||||
|
||||
public string OriginalImagePath { get; set; }
|
||||
|
||||
public DateTime OriginalImageDateModified { get; set; }
|
||||
|
||||
public bool CropWhiteSpace { get; set; }
|
||||
|
||||
public int? Width { get; set; }
|
||||
|
||||
public int? Height { get; set; }
|
||||
|
||||
public int? MaxWidth { get; set; }
|
||||
|
||||
public int? MaxHeight { get; set; }
|
||||
|
||||
public int? Quality { get; set; }
|
||||
|
||||
public List<IImageEnhancer> Enhancers { get; set; }
|
||||
|
||||
public ImageOutputFormat OutputFormat { get; set; }
|
||||
}
|
||||
|
||||
public enum ImageOutputFormat
|
||||
{
|
||||
Original,
|
||||
Bmp,
|
||||
Gif,
|
||||
Jpg,
|
||||
Png
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user