mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
Implement foreground layer option
This commit is contained in:
parent
ea374c01b1
commit
084bd47413
@ -199,7 +199,14 @@ 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