28 lines
1.4 KiB
C#
28 lines
1.4 KiB
C#
namespace View_by_Distance.Shared.Models.Stateless.Methods;
|
|
|
|
internal abstract class OutputResolution
|
|
{
|
|
|
|
internal static (int Width, int Height) Get(Models.OutputResolution outputResolution)
|
|
{
|
|
// (int, int) result = outputResolution.Orientation switch // exif 274
|
|
// {
|
|
// 0 => new(outputResolution.Width, outputResolution.Height),
|
|
// 1 => new(outputResolution.Width, outputResolution.Height), // 1 = Horizontal (normal)
|
|
// 2 => new(outputResolution.Width, outputResolution.Height), // 2 = Mirror horizontal
|
|
// 3 => new(outputResolution.Width, outputResolution.Height), // 3 = Rotate 180
|
|
// 4 => new(outputResolution.Width, outputResolution.Height), // 4 = Mirror vertical
|
|
// 5 => new(outputResolution.Height, outputResolution.Width), // 5 = Mirror horizontal and rotate 270 CW
|
|
// 6 => new(outputResolution.Height, outputResolution.Width), // 6 = Rotate 90 CW
|
|
// 7 => new(outputResolution.Height, outputResolution.Width), // 7 = Mirror horizontal and rotate 90 CW
|
|
// 8 => new(outputResolution.Height, outputResolution.Width), // 8 = Rotate 270 CW
|
|
// _ => throw new Exception()
|
|
// };
|
|
(int, int) result = outputResolution.Orientation switch // exif 274
|
|
{
|
|
_ => new(outputResolution.Width, outputResolution.Height)
|
|
};
|
|
return result;
|
|
}
|
|
|
|
} |