using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Entities;
using System.Drawing;
namespace MediaBrowser.Controller.Drawing
{
///
/// Provides a base image processor class that plugins can use to process images as they are being writen to http responses
/// Since this is completely modular with MEF, a plugin only needs to have a subclass in their assembly with the following attribute on the class:
/// [Export(typeof(BaseImageProcessor))]
/// This will require a reference to System.ComponentModel.Composition
///
public abstract class BaseImageProcessor
{
///
/// Processes the primary image for a BaseEntity (Person, Studio, User, etc)
///
/// The bitmap holding the original image, after re-sizing
/// The graphics surface on which the output is drawn
/// The entity that owns the image
public abstract void ProcessImage(Bitmap bitmap, Graphics graphics, BaseEntity entity);
///
/// Processes an image for a BaseItem
///
/// The bitmap holding the original image, after re-sizing
/// The graphics surface on which the output is drawn
/// The entity that owns the image
/// The image type
/// The image index (currently only used with backdrops)
public abstract void ProcessImage(Bitmap bitmap, Graphics graphics, BaseItem entity, ImageType imageType, int imageIndex);
}
}