Browse Source

Don't need other path for grayscale output.

Jeroen van Rijn 4 years ago
parent
commit
3160a6a12c
1 changed files with 0 additions and 13 deletions
  1. 0 13
      core/image/png/png.odin

+ 0 - 13
core/image/png/png.odin

@@ -1230,19 +1230,6 @@ load_from_stream :: proc(stream: io.Stream, options := Options{}, allocator := c
 		unreachable("We should never see bit depths other than 8, 16 and 'Paletted' here.");
 		unreachable("We should never see bit depths other than 8, 16 and 'Paletted' here.");
 	}
 	}
 
 
-	// TODO: Rather than first expanding to RGB(A) and then dropping channels, give these their own path.
-	if .do_not_expand_grayscale in options && .Color not_in info.header.color_type {
-
-		single, single_ok := image.return_single_channel(img, .R);
-		if single_ok {
-			destroy(img);
-			img = single;
-		} else {
-			destroy(single);
-			return img, E_PNG.Post_Processing_Error;
-		}
-	}
-
 	return img, E_General.OK;
 	return img, E_General.OK;
 }
 }