public static RaidImageConfiguration GetRaidImageConfiguration(this Image <Rgba32> image, bool saveDebugImages) { var configuration = new RaidImageConfiguration(1080, 1920); switch (image.Height) { case 2960: if (image.HasBottomBar()) { configuration = new Ric1440X2960BottomBar(); } else { configuration = new Ric1440X2960WithoutBar(); } break; case 2436: configuration = new IPhoneXImageConfiguration(); break; case 2240: if (image.HasBottomBar()) { configuration = new BottomMenu1080X2240Configuration(); } break; case 2220: if (image.HasBottomBar()) { if (image.HasTopBar()) { configuration = new Ric1080X2220TopAndBottomBar(); } else { //configuration = new WithoutMenu1080X2220Configuration(); //configuration.BottomMenuHeight = GetBottomMenuHeight(image); configuration = new Ric1080X2220BottomBar(); } } else { configuration = new Ric1080X2220WithoutBar(); } break; case 2160: if (image.HasBottomBar()) { configuration = new Ric1080X2160BottomBar(); configuration.BottomMenuHeight = GetBottomBarHeight(image); } else { configuration = new Ric1080X2160WithoutBar(); } break; case 1920: if (image.HasBottomBar()) { configuration.BottomMenuHeight = GetBottomBarHeight(image); if (configuration.BottomMenuHeight < 50) { configuration.BottomMenuHeight = 128; } } break; case 1600: switch (image.Width) { case 739: configuration = new WithoutMenu739X1600(); break; case 900: if (image.HasBottomBar()) { configuration = new BottomMenu900X1600Configuration(); } break; } break; case 1334: if (image.HasTopBar()) { configuration = new Ric750X1334WithTopBar(); } else { configuration = new Ric750X1334WithoutBar(); } break; case 1280: if (image.HasBottomBar()) { configuration = new BottomMenu720X1280Configuration(); } break; } configuration.SaveDebugImages = saveDebugImages; return(configuration); }