update resizing params
This commit is contained in:
parent
c7d433009b
commit
bfda416579
|
@ -547,7 +547,7 @@ namespace MediaBrowser.Api.Playback
|
||||||
{
|
{
|
||||||
var heightParam = request.Height.Value.ToString(UsCulture);
|
var heightParam = request.Height.Value.ToString(UsCulture);
|
||||||
|
|
||||||
filters.Add(string.Format("scale=trunc(oh*a*2)/2:{0}", heightParam));
|
filters.Add(string.Format("scale=trunc(oh*a/2)*2:{0}", heightParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
// If a max width was requested
|
// If a max width was requested
|
||||||
|
@ -555,7 +555,7 @@ namespace MediaBrowser.Api.Playback
|
||||||
{
|
{
|
||||||
var maxWidthParam = request.MaxWidth.Value.ToString(UsCulture);
|
var maxWidthParam = request.MaxWidth.Value.ToString(UsCulture);
|
||||||
|
|
||||||
filters.Add(string.Format("scale=min(iw\\,{0}):trunc(ow/dar/2)*2", maxWidthParam));
|
filters.Add(string.Format("scale=trunc(min(max(iw\\,ih*dar)\\,{0})/2)*2:trunc(ow/dar/2)*2", maxWidthParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
// If a max height was requested
|
// If a max height was requested
|
||||||
|
|
Loading…
Reference in New Issue
Block a user