Add grayscale resolutions.

This commit is contained in:
2019-05-19 15:56:12 +01:00
parent c0df1ed4b6
commit 20da3251f8
11 changed files with 1967 additions and 37 deletions

View File

@@ -47,6 +47,8 @@ namespace Cicm.Database.Models
public long? Palette { get; set; }
[DisplayName("Character based")]
public bool Chars { get; set; }
[DisplayName("Grayscale")]
public bool Grayscale { get; set; }
public virtual ICollection<ResolutionsByGpu> ResolutionsByGpu { get; set; }
@@ -59,17 +61,25 @@ namespace Cicm.Database.Models
if(Colors == null) return $"{Width}x{Height} characters";
if(Palette != null && Colors != Palette)
return $"{Width}x{Height} characters at {Colors} colors from a palette of {Palette}";
return Grayscale
? $"{Width}x{Height} characters at {Colors} grays from a palette of {Palette}"
: $"{Width}x{Height} characters at {Colors} colors from a palette of {Palette}";
return $"{Width}x{Height} characters at {Colors} colors";
return Colors == 2 && Grayscale
? $"{Width}x{Height} black and white characters"
: $"{Width}x{Height} characters at {Colors} colors";
}
if(Colors == null) return $"{Width}x{Height} pixels";
if(Palette != null && Colors != Palette)
return $"{Width}x{Height} pixels at {Colors} colors from a palette of {Palette}";
return Grayscale
? $"{Width}x{Height} pixels at {Colors} grays from a palette of {Palette}"
: $"{Width}x{Height} pixels at {Colors} colors from a palette of {Palette}";
return $"{Width}x{Height} pixels at {Colors} colors";
return Colors == 2 && Grayscale
? $"{Width}x{Height} black and white pixels"
: $"{Width}x{Height} pixels at {Colors} colors";
}
}
}