Exemple #1
0
        private static double GetEstimatedAspectRatio(ImageType type, IHasImages item)
        {
            switch (type)
            {
            case ImageType.Art:
            case ImageType.Backdrop:
            case ImageType.Chapter:
            case ImageType.Screenshot:
            case ImageType.Thumb:
                return(1.78);

            case ImageType.Banner:
                return(5.4);

            case ImageType.Box:
            case ImageType.BoxRear:
            case ImageType.Disc:
            case ImageType.Menu:
                return(1);

            case ImageType.Logo:
                return(2.58);

            case ImageType.Primary:
                return(item.GetDefaultPrimaryImageAspectRatio() ?? .667);

            default:
                return(1);
            }
        }