Implement foreground layer option

This commit is contained in:
Eric Reed 2016-02-26 10:10:43 -05:00
parent ea374c01b1
commit 084bd47413

View File

@ -198,8 +198,15 @@ namespace Emby.Drawing.ImageMagick
{
return;
}
// TODO
Double opacity;
if (!Double.TryParse(options.ForegroundLayer, out opacity)) opacity = .4;
using (var pixel = new PixelWand("#000", opacity))
using (var overlay = new MagickWand(wand.CurrentImage.Width, wand.CurrentImage.Height, pixel))
{
wand.CurrentImage.CompositeImage(overlay, CompositeOperator.OverCompositeOp, 0, 0);
}
}
private void AutoOrientImage(MagickWand wand)