ref: 2c8c2135acede2a9d86592350b3116b46c96227e
parent: d12cd57c7b7c462deb644c2056e8906e2fee4b93
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Mon Jan 21 06:09:47 EST 2013
tga: fix bad output channel descriptor for grayscale images and -9 flag, revert page work arround
--- a/sys/src/cmd/jpg/tga.c
+++ b/sys/src/cmd/jpg/tga.c
@@ -154,9 +154,10 @@
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){--- a/sys/src/cmd/page.c
+++ b/sys/src/cmd/page.c
@@ -294,7 +294,7 @@
if(strcmp(p->ext, "ico") == 0)
snprint(nam, sizeof(nam), "%s -c", p->ext);
else
- snprint(nam, sizeof(nam), "%s -t39", p->ext);
+ snprint(nam, sizeof(nam), "%s -t9", p->ext);
pipeline(fd, "%s", nam);
}
--
⑨