update dynamic images
This commit is contained in:
parent
c9c5a93450
commit
305398ed9c
|
@ -126,7 +126,7 @@ namespace MediaBrowser.Server.Implementations.Photos
|
||||||
|
|
||||||
protected abstract Task<List<BaseItem>> GetItemsWithImages(IHasImages item);
|
protected abstract Task<List<BaseItem>> GetItemsWithImages(IHasImages item);
|
||||||
|
|
||||||
private const string Version = "15";
|
private const string Version = "17";
|
||||||
protected string GetConfigurationCacheKey(List<BaseItem> items, string itemName)
|
protected string GetConfigurationCacheKey(List<BaseItem> items, string itemName)
|
||||||
{
|
{
|
||||||
var parts = Version + "_" + (itemName ?? string.Empty) + "_" +
|
var parts = Version + "_" + (itemName ?? string.Empty) + "_" +
|
||||||
|
|
|
@ -155,17 +155,17 @@ namespace MediaBrowser.Server.Implementations.UserViews
|
||||||
|
|
||||||
private MagickWand BuildPosterCollageWand(IEnumerable<string> paths, int width, int height)
|
private MagickWand BuildPosterCollageWand(IEnumerable<string> paths, int width, int height)
|
||||||
{
|
{
|
||||||
var inputPaths = ProjectPaths(paths, 3);
|
var inputPaths = ProjectPaths(paths, 4);
|
||||||
using (var wandImages = new MagickWand(inputPaths))
|
using (var wandImages = new MagickWand(inputPaths))
|
||||||
{
|
{
|
||||||
var wand = new MagickWand(width, height);
|
var wand = new MagickWand(width, height);
|
||||||
wand.OpenImage("gradient:#111111-#111111");
|
wand.OpenImage("gradient:#111111-#111111");
|
||||||
using (var draw = new DrawingWand())
|
using (var draw = new DrawingWand())
|
||||||
{
|
{
|
||||||
var iSlice = Convert.ToInt32(width * .3);
|
var iSlice = Convert.ToInt32(width * 0.225);
|
||||||
int iTrans = Convert.ToInt32(height * .25);
|
int iTrans = Convert.ToInt32(height * .25);
|
||||||
int iHeight = Convert.ToInt32(height * .65);
|
int iHeight = Convert.ToInt32(height * .65);
|
||||||
var horizontalImagePadding = Convert.ToInt32(width * 0.025);
|
var horizontalImagePadding = Convert.ToInt32(width * 0.0275);
|
||||||
|
|
||||||
foreach (var element in wandImages.ImageList)
|
foreach (var element in wandImages.ImageList)
|
||||||
{
|
{
|
||||||
|
@ -211,7 +211,7 @@ namespace MediaBrowser.Server.Implementations.UserViews
|
||||||
|
|
||||||
private MagickWand BuildPosterCollageWandWithText(IEnumerable<string> paths, string label, int width, int height)
|
private MagickWand BuildPosterCollageWandWithText(IEnumerable<string> paths, string label, int width, int height)
|
||||||
{
|
{
|
||||||
var inputPaths = ProjectPaths(paths, 3);
|
var inputPaths = ProjectPaths(paths, 4);
|
||||||
using (var wandImages = new MagickWand(inputPaths))
|
using (var wandImages = new MagickWand(inputPaths))
|
||||||
{
|
{
|
||||||
var wand = new MagickWand(width, height);
|
var wand = new MagickWand(width, height);
|
||||||
|
@ -231,10 +231,10 @@ namespace MediaBrowser.Server.Implementations.UserViews
|
||||||
var textContainerY = Convert.ToInt32(height * .165);
|
var textContainerY = Convert.ToInt32(height * .165);
|
||||||
wand.CurrentImage.AnnotateImage(draw, (width - fontMetrics.TextWidth) / 2, textContainerY, 0.0, label);
|
wand.CurrentImage.AnnotateImage(draw, (width - fontMetrics.TextWidth) / 2, textContainerY, 0.0, label);
|
||||||
|
|
||||||
var iSlice = Convert.ToInt32(width * .3);
|
var iSlice = Convert.ToInt32(width * 0.225);
|
||||||
int iTrans = Convert.ToInt32(height * 0.2);
|
int iTrans = Convert.ToInt32(height * 0.2);
|
||||||
int iHeight = Convert.ToInt32(height * 0.46296296296296296296296296296296);
|
int iHeight = Convert.ToInt32(height * 0.46296296296296296296296296296296);
|
||||||
var horizontalImagePadding = Convert.ToInt32(width * 0.025);
|
var horizontalImagePadding = Convert.ToInt32(width * 0.0275);
|
||||||
|
|
||||||
foreach (var element in wandImages.ImageList)
|
foreach (var element in wandImages.ImageList)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user