From d8c01ded6eb57ba312e1cd62c4fa51dbcce6053a Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Wed, 19 Sep 2012 12:51:37 -0400 Subject: made some improvements to the base http handler --- MediaBrowser.Controller/Drawing/ImageProcessor.cs | 32 ----------------------- 1 file changed, 32 deletions(-) (limited to 'MediaBrowser.Controller/Drawing/ImageProcessor.cs') diff --git a/MediaBrowser.Controller/Drawing/ImageProcessor.cs b/MediaBrowser.Controller/Drawing/ImageProcessor.cs index 7ee4ef734..29e40d17d 100644 --- a/MediaBrowser.Controller/Drawing/ImageProcessor.cs +++ b/MediaBrowser.Controller/Drawing/ImageProcessor.cs @@ -59,17 +59,6 @@ namespace MediaBrowser.Controller.Drawing ImageFormat outputFormat = originalImage.RawFormat; - // Run Kernel image processors - if (Kernel.Instance.ImageProcessors.Any()) - { - ExecuteAdditionalImageProcessors(originalImage, thumbnail, thumbnailGraph, entity, imageType, imageIndex); - - if (Kernel.Instance.ImageProcessors.Any(i => i.RequiresTransparency)) - { - outputFormat = ImageFormat.Png; - } - } - // Write to the output stream SaveImage(outputFormat, thumbnail, toStream, quality); @@ -109,27 +98,6 @@ namespace MediaBrowser.Controller.Drawing return entity.PrimaryImagePath; } - - /// - /// Executes additional image processors that are registered with the Kernel - /// - /// The original Image, before re-sizing - /// 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) - private static void ExecuteAdditionalImageProcessors(Image originalImage, Bitmap bitmap, Graphics graphics, BaseEntity entity, ImageType imageType, int imageIndex) - { - foreach (var processor in Kernel.Instance.ImageProcessors) - { - if (processor.IsConfiguredToProcess(entity, imageType, imageIndex)) - { - processor.ProcessImage(originalImage, bitmap, graphics, entity, imageType, imageIndex); - } - } - } - public static void SaveImage(ImageFormat outputFormat, Image newImage, Stream toStream, int? quality) { // Use special save methods for jpeg and png that will result in a much higher quality image -- cgit v1.2.3