X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpng.c;h=49c3c3d0d6a50f1bd8be2075d45026a9878d7a70;hb=70c85e8a814e75b29883fc347a65f83af370249b;hp=abb5a3e83460a3f0fcc7717eea68eb3cda517537;hpb=a8450dc9cf06c6bb87170181901fc1e54c040d9d;p=swftools.git diff --git a/lib/png.c b/lib/png.c index abb5a3e..49c3c3d 100644 --- a/lib/png.c +++ b/lib/png.c @@ -634,10 +634,22 @@ int getPNG(char*sname, int*destwidth, int*destheight, unsigned char**destdata) } else { old = &data2[(y-1)*header.width*4]; } - if(header.mode == 6) + if(header.mode == 6) { applyfilter4(mode, src, old, dest, header.width); - else // header.mode = 2 + } else { // header.mode = 2 applyfilter3(mode, src, old, dest, header.width); + /* replace alpha color */ + if(hasalphacolor) { + int x; + for(x=0;x