add fixes for dng images

This commit is contained in:
Luke Pulverenti
2017-09-22 16:33:01 -04:00
parent 2d29d903be
commit 31b01cbb56
21 changed files with 242 additions and 283 deletions

View File

@@ -62,6 +62,35 @@ namespace MediaBrowser.Controller.Entities
return true;
}
public override double? GetDefaultPrimaryImageAspectRatio()
{
if (Width.HasValue && Height.HasValue)
{
double width = Width.Value;
double height = Height.Value;
if (Orientation.HasValue)
{
switch (Orientation.Value)
{
case ImageOrientation.LeftBottom:
case ImageOrientation.LeftTop:
case ImageOrientation.RightBottom:
case ImageOrientation.RightTop:
var temp = height;
height = width;
width = temp;
break;
}
}
width /= Height.Value;
return width;
}
return base.GetDefaultPrimaryImageAspectRatio();
}
public int? Width { get; set; }
public int? Height { get; set; }
public string CameraMake { get; set; }