aboutsummaryrefslogtreecommitdiff
path: root/Emby.Drawing
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-02-23 14:48:58 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-02-23 14:48:58 -0500
commitc7fe8587cbf9e42f195d06aab07a719f991fbb9e (patch)
treed587bccd09c40de1b8a2221f2f669f5c3e70affb /Emby.Drawing
parentae8060d4aded662197f25d4312f18d0534edb15a (diff)
stub out ForegroundLayer param
Diffstat (limited to 'Emby.Drawing')
-rw-r--r--Emby.Drawing/ImageMagick/ImageMagickEncoder.cs13
-rw-r--r--Emby.Drawing/ImageProcessor.cs7
2 files changed, 19 insertions, 1 deletions
diff --git a/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs b/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs
index b8300ac979..7779c2fc5d 100644
--- a/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs
+++ b/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs
@@ -155,6 +155,7 @@ namespace Emby.Drawing.ImageMagick
AutoOrientImage(originalImage);
}
+ AddForegroundLayer(originalImage, options);
DrawIndicator(originalImage, width, height, options);
originalImage.CurrentImage.CompressionQuality = quality;
@@ -177,6 +178,8 @@ namespace Emby.Drawing.ImageMagick
}
wand.CurrentImage.CompositeImage(originalImage, CompositeOperator.OverCompositeOp, 0, 0);
+
+ AddForegroundLayer(wand, options);
DrawIndicator(wand, width, height, options);
wand.CurrentImage.CompressionQuality = quality;
@@ -189,6 +192,16 @@ namespace Emby.Drawing.ImageMagick
SaveDelay();
}
+ private void AddForegroundLayer(MagickWand wand, ImageProcessingOptions options)
+ {
+ if (string.IsNullOrWhiteSpace(options.ForegroundLayer))
+ {
+ return;
+ }
+
+ // TODO
+ }
+
private void AutoOrientImage(MagickWand wand)
{
wand.CurrentImage.AutoOrientImage();
diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs
index e016127004..ef608d2667 100644
--- a/Emby.Drawing/ImageProcessor.cs
+++ b/Emby.Drawing/ImageProcessor.cs
@@ -473,7 +473,7 @@ namespace Emby.Drawing
/// <summary>
/// Gets the cache file path based on a set of parameters
/// </summary>
- private string GetCacheFilePath(string originalPath, ImageSize outputSize, int quality, DateTime dateModified, ImageFormat format, bool addPlayedIndicator, double percentPlayed, int? unwatchedCount, string backgroundColor)
+ private string GetCacheFilePath(string originalPath, ImageSize outputSize, int quality, DateTime dateModified, ImageFormat format, bool addPlayedIndicator, double percentPlayed, int? unwatchedCount, string backgroundColor, string foregroundLayer)
{
var filename = originalPath;
@@ -507,6 +507,11 @@ namespace Emby.Drawing
filename += "b=" + backgroundColor;
}
+ if (!string.IsNullOrEmpty(foregroundLayer))
+ {
+ filename += "fl=" + foregroundLayer;
+ }
+
filename += "v=" + Version;
return GetCachePath(ResizedImageCachePath, filename, "." + format.ToString().ToLower());