tga: fix bad output channel descriptor for grayscale images and -9 flag, revert page work arround

This commit is contained in:
cinap_lenrek 2013-01-21 11:09:47 +01:00
parent d789b1cc91
commit e18b9f6fd2
2 changed files with 4 additions and 3 deletions

View file

@ -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){

View file

@ -294,7 +294,7 @@ popenimg(Page *p)
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);
}