diff options
author | Matthias Kramm <kramm@quiss.org> | 2010-03-31 11:44:41 -0700 |
---|---|---|
committer | Matthias Kramm <kramm@quiss.org> | 2010-03-31 11:44:41 -0700 |
commit | f25fd347b67d4f6cb2076c2a4455a6ff55a4b61a (patch) | |
tree | 2ab46c8a15c718fcaecc56f00ce9b3d236cfb11a | |
parent | b2b02120bcfd17bc5733769f9e0591dfb6329429 (diff) |
minor speedups/bugfixescompact_record
-rw-r--r-- | lib/devices/record.c | 3 | ||||
-rw-r--r-- | lib/png.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/devices/record.c b/lib/devices/record.c index 796e0860..165e4c58 100644 --- a/lib/devices/record.c +++ b/lib/devices/record.c @@ -185,6 +185,7 @@ static void dumpImage(writer_t*w, state_t*state, gfximage_t*img) //48.0% images (3488650 bytes) (without filter, Z_BEST_SPEED) //55.3% images (4665889 bytes) (without filter, fastlz level 2) //55.6% images (4726334 bytes) (without filter, fastlz level 1) + //83.0% images (18091804 bytes) (no compression) gfxcolor_t*image; #ifdef FILTER_IMAGES @@ -206,7 +207,7 @@ static void dumpImage(writer_t*w, state_t*state, gfximage_t*img) #ifdef HAVE_FASTLZ compressdata_size = fastlz_compress_level(2, (void*)image, size*sizeof(gfxcolor_t), compressdata); #else - compress2(compressdata, &compressdata_size, (void*)image, sizeof(gfxcolor_t)*size, 6); + compress2(compressdata, &compressdata_size, (void*)image, sizeof(gfxcolor_t)*size, Z_BEST_SPEED); #endif writer_writeU32(w, compressdata_size); @@ -1513,11 +1513,11 @@ static int png_apply_filter(unsigned char*dest, unsigned char*src, int width, in int png_apply_filter_8(unsigned char*dest, unsigned char*src, int width, int y) { - png_apply_filter(dest, src, width, y, 8); + return png_apply_filter(dest, src, width, y, 8); } int png_apply_filter_32(unsigned char*dest, unsigned char*src, int width, int y) { - png_apply_filter(dest, src, width, y, 32); + return png_apply_filter(dest, src, width, y, 32); } EXPORT void savePNG(const char*filename, unsigned char*data, int width, int height, int numcolors) |