switched png compression to 'fastest'
[swftools.git] / lib / png.c
index 95f5b11..09ffe4a 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++;
@@ -1081,7 +1082,7 @@ EXPORT void writePNG(const char*filename, unsigned char*data, int width, int hei
     zs.opaque = Z_NULL;
     zs.next_out = writebuf;
     zs.avail_out = ZLIB_BUFFER_SIZE;
-    ret = deflateInit(&zs, 9);
+    ret = deflateInit(&zs, 1);
     if (ret != Z_OK) {
        fprintf(stderr, "error in deflateInit(): %s", zs.msg?zs.msg:"unknown");
        return;