diff options
-rw-r--r-- | mandel.cu | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -232,12 +232,16 @@ int main() { uint8_t *img = new uint8_t[3 * 1920 * 1080]; - for (int i = 0; i <= 141; i++) { + for (int i = 0; i <= 5 * 141; i++) { mandel_render(img, ctx, &par, 1); char fname[64]; - sprintf(fname, "outdir/out%03d.bmp", i); - bmp_rgb_encode_file(fname, img, 1920, 1080); - par.imgw *= 0.8; + sprintf(fname, "outdir/out%03d.png", i); + int64_t t1 = gettimestamp(); + assert(lodepng::encode(fname, img, 1920, 1080, LCT_RGB) == 0); + // bmp_rgb_encode_file(fname, img, 1920, 1080); + int64_t t2 = gettimestamp(); + cout << "file writing: " << (t2 - t1) / 1000000.0 << " sec" << endl; + par.imgw *= pow(0.8, 1.0 / 5.0); } mandel_free(ctx); |