From e18b9f6fd2f37013abc6a1a2ae3b06f88df6426e Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 21 Jan 2013 11:09:47 +0100 Subject: tga: fix bad output channel descriptor for grayscale images and -9 flag, revert page work arround --- sys/src/cmd/jpg/tga.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/src/cmd/jpg') diff --git a/sys/src/cmd/jpg/tga.c b/sys/src/cmd/jpg/tga.c index f4f729d17..940d76d88 100644 --- a/sys/src/cmd/jpg/tga.c +++ b/sys/src/cmd/jpg/tga.c @@ -154,9 +154,10 @@ show(int fd, char *name) if(outchan == CMAP8) c = torgbv(r, !eflag); else{ - if(outchan==GREY8 || (r->chandesc==CY && threeflag==0)) + if(outchan==GREY8 || (r->chandesc==CY && threeflag==0)){ c = totruecolor(r, CY); - else + outchan = GREY8; + }else c = totruecolor(r, CRGB24); } if(c == nil){ -- cgit v1.2.3