From 3160a6a12c5437413afcae70a893ec7debb91893 Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Sun, 2 May 2021 21:11:06 +0200 Subject: [PATCH] Don't need other path for grayscale output. --- core/image/png/png.odin | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/core/image/png/png.odin b/core/image/png/png.odin index 912b31300..716185c5f 100644 --- a/core/image/png/png.odin +++ b/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."); } - // 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; }