summaryrefslogtreecommitdiff
path: root/sys/src/cmd/jpg
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-01-21 11:09:47 +0100
committercinap_lenrek <cinap_lenrek@gmx.de>2013-01-21 11:09:47 +0100
commite18b9f6fd2f37013abc6a1a2ae3b06f88df6426e (patch)
tree27e516987a17e779bb840a5323182737c1ade62e /sys/src/cmd/jpg
parentd789b1cc917839f70f582a7bf90c28099fbca8db (diff)
tga: fix bad output channel descriptor for grayscale images and -9 flag, revert page work arround
Diffstat (limited to 'sys/src/cmd/jpg')
-rw-r--r--sys/src/cmd/jpg/tga.c5
1 files changed, 3 insertions, 2 deletions
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){