added opengl check
[swftools.git] / lib / png.c
index e793367..8578d2d 100644 (file)
--- a/lib/png.c
+++ b/lib/png.c
@@ -197,6 +197,7 @@ static void applyfilter1(int mode, unsigned char*src, unsigned char*old, unsigne
     else if(mode==3) {
        for(x=0;x<width;x++) {
            *dest = *src+(*old+last)/2;
+           last = *dest;
            dest++;
            old++;
            src++;
@@ -484,7 +485,6 @@ EXPORT int getPNG(const char*sname, int*destwidth, int*destheight, unsigned char
     }
 
     if(!png_read_header(fi, &header)) {
-       printf("Error reading header from file %s\n", sname);
        return 0;
     }