Implement foreground layer option
This commit is contained in:
parent
ea374c01b1
commit
084bd47413
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user