tga: fix flip/reflect

This commit is contained in:
ftrvxmtrx 2013-01-22 17:02:31 +01:00
parent 54b62fe493
commit 8e7a00e143

View file

@ -473,9 +473,9 @@ Breadtga(Biobuf *bp)
werrstr("ReadTGA: decode fail (%d!=%d) - %r\n", n, num); werrstr("ReadTGA: decode fail (%d!=%d) - %r\n", n, num);
goto Error; goto Error;
} }
if(h->xorigin != 0) if((h->descriptor&(1<<4)) != 0)
reflect(ar); reflect(ar);
if(h->yorigin == 0) if((h->descriptor&(1<<5)) == 0)
flip(ar); flip(ar);
free(h); free(h);