import fix for transparent gifs by rob. colors are now no longer inverted. Reference: /n/sources/patch/applied/gif Date: Mon Sep 19 08:29:13 CES 2011 Signed-off-by: quanstro@quanstro.net --- /sys/src/cmd/jpg/gif.c Mon Sep 19 08:27:39 2011 +++ /sys/src/cmd/jpg/gif.c Mon Sep 19 08:27:38 2011 @@ -229,7 +229,7 @@ * r is used only for reference; the image is already in c. */ void -whiteout(Rawimage *r, Rawimage *c) +blackout(Rawimage *r, Rawimage *c) { int i, trindex; uchar *rp, *cp; @@ -241,9 +241,9 @@ for(i=0; ichanlen; i++){ if(*rp == trindex){ *cp++ = 0x00; - *cp++ = 0xFF; - *cp++ = 0xFF; - *cp++ = 0xFF; + *cp++ = 0x00; + *cp++ = 0x00; + *cp++ = 0x00; }else{ *cp++ = 0xFF; cp += 3; @@ -254,7 +254,7 @@ for(i=0; ichanlen; i++){ if(*rp == trindex){ *cp++ = 0x00; - *cp++ = 0xFF; + *cp++ = 0x00; }else{ *cp++ = 0xFF; cp++; @@ -380,7 +380,7 @@ if(nineflag){ if(images[0]->gifflags&TRANSP){ addalpha(rgbv[0]); - whiteout(images[0], rgbv[0]); + blackout(images[0], rgbv[0]); } chantostr(buf, outchan); print("%11s %11d %11d %11d %11d ", buf, @@ -392,7 +392,7 @@ }else if(cflag){ if(images[0]->gifflags&TRANSP){ addalpha(rgbv[0]); - whiteout(images[0], rgbv[0]); + blackout(images[0], rgbv[0]); } if(writerawimage(1, rgbv[0]) < 0){ fprint(2, "gif: %s: write error: %r\n", name);