]> git.nihav.org Git - nihav.git/commitdiff
nihav_core/formats: allow proper spelling of "grey" in formaton name master
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 2 Mar 2026 18:25:02 +0000 (19:25 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 2 Mar 2026 18:25:02 +0000 (19:25 +0100)
nihav-core/src/formats.rs

index 4c4a11639b1e3a541bd3b10df8560646007e18b3..ee523af781f4004c68875cc8d289090b96b12dd2 100644 (file)
@@ -959,7 +959,7 @@ fn parse_rgb_format(s: &str) -> Result<NAPixelFormaton, FormatParseError> {
 
 fn parse_yuv_format(s: &str) -> Result<NAPixelFormaton, FormatParseError> {
     match s {
 
 fn parse_yuv_format(s: &str) -> Result<NAPixelFormaton, FormatParseError> {
     match s {
-        "y8" | "y400" | "gray" => {
+        "y8" | "y400" | "grey" | "gray" => {
             return Ok(NAPixelFormaton {
                     model: ColorModel::YUV(YUVSubmodel::YUVJ), components: 1,
                     comp_info: [
             return Ok(NAPixelFormaton {
                     model: ColorModel::YUV(YUVSubmodel::YUVJ), components: 1,
                     comp_info: [
@@ -967,7 +967,7 @@ fn parse_yuv_format(s: &str) -> Result<NAPixelFormaton, FormatParseError> {
                         None, None, None, None],
                     elem_size: 1, be: true, alpha: false, palette: false });
         },
                         None, None, None, None],
                     elem_size: 1, be: true, alpha: false, palette: false });
         },
-        "y8a" | "y400a" | "graya" => {
+        "y8a" | "y400a" | "greya" | "graya" => {
             return Ok(NAPixelFormaton {
                     model: ColorModel::YUV(YUVSubmodel::YUVJ), components: 2,
                     comp_info: [
             return Ok(NAPixelFormaton {
                     model: ColorModel::YUV(YUVSubmodel::YUVJ), components: 2,
                     comp_info: [