update scaling with MaxHeight
This commit is contained in:
parent
dc09bb8c08
commit
f5a6a418f5
|
@ -34,7 +34,7 @@ namespace Emby.Drawing.GDI
|
||||||
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||||
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||||
|
|
||||||
// This causes the image to be blank in OSX
|
// SourceCopy causes the image to be blank in OSX
|
||||||
//graphics.CompositingMode = CompositingMode.SourceCopy;
|
//graphics.CompositingMode = CompositingMode.SourceCopy;
|
||||||
|
|
||||||
for (var row = 0; row < rows; row++)
|
for (var row = 0; row < rows; row++)
|
||||||
|
@ -83,7 +83,7 @@ namespace Emby.Drawing.GDI
|
||||||
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||||
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||||
|
|
||||||
// This causes the image to be blank in OSX
|
// SourceCopy causes the image to be blank in OSX
|
||||||
//graphics.CompositingMode = CompositingMode.SourceCopy;
|
//graphics.CompositingMode = CompositingMode.SourceCopy;
|
||||||
|
|
||||||
for (var row = 0; row < rows; row++)
|
for (var row = 0; row < rows; row++)
|
||||||
|
|
|
@ -119,9 +119,11 @@ namespace Emby.Drawing.GDI
|
||||||
thumbnailGraph.SmoothingMode = SmoothingMode.HighQuality;
|
thumbnailGraph.SmoothingMode = SmoothingMode.HighQuality;
|
||||||
thumbnailGraph.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
thumbnailGraph.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||||
thumbnailGraph.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
thumbnailGraph.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||||
thumbnailGraph.CompositingMode = !hasPostProcessing ?
|
|
||||||
CompositingMode.SourceCopy :
|
// SourceCopy causes the image to be blank in OSX
|
||||||
CompositingMode.SourceOver;
|
//thumbnailGraph.CompositingMode = !hasPostProcessing ?
|
||||||
|
// CompositingMode.SourceCopy :
|
||||||
|
// CompositingMode.SourceOver;
|
||||||
|
|
||||||
SetBackgroundColor(thumbnailGraph, options);
|
SetBackgroundColor(thumbnailGraph, options);
|
||||||
|
|
||||||
|
|
|
@ -644,7 +644,7 @@ namespace MediaBrowser.Api.Playback
|
||||||
{
|
{
|
||||||
var maxHeightParam = request.MaxHeight.Value.ToString(UsCulture);
|
var maxHeightParam = request.MaxHeight.Value.ToString(UsCulture);
|
||||||
|
|
||||||
filters.Add(string.Format("scale=trunc(oh*a/2)*2:min(ih\\,{0})", maxHeightParam));
|
filters.Add(string.Format("scale=trunc(oh*a/2)*2:min(max(iw/dar\\,ih)\\,{0})", maxHeightParam));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -978,7 +978,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
{
|
{
|
||||||
var maxHeightParam = request.MaxHeight.Value.ToString(UsCulture);
|
var maxHeightParam = request.MaxHeight.Value.ToString(UsCulture);
|
||||||
|
|
||||||
filters.Add(string.Format("scale=trunc(oh*a/2)*2:min(ih\\,{0})", maxHeightParam));
|
filters.Add(string.Format("scale=trunc(oh*a/2)*2:min(max(iw/dar\\,ih)\\,{0})", maxHeightParam));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user