else if(mode==3) {
for(x=0;x<width;x++) {
*dest = *src+(*old+last)/2;
+ last = *dest;
dest++;
old++;
src++;
}
if(!png_read_header(fi, &header)) {
- printf("Error reading header from file %s\n", sname);
return 0;
}
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;