diff options
author | Marius Kintel <marius@kintel.net> | 2013-03-28 03:55:51 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-03-28 03:55:51 (GMT) |
commit | eefcd6d0b271642d470cd55bc47d1579d943938e (patch) | |
tree | 48f9e4db455879025adb9317b740bfa4b72c2d66 /tests/imageutils-lodepng.cc | |
parent | f70578f362c8c2c78036c9de846c20802ac7aa81 (diff) | |
parent | beff2b1f4811b7f9d2b58bfc6a469a363bc9bfd0 (diff) |
Merge branch 'master' into epec-kernel
Conflicts:
src/PolySetCGALEvaluator.cc
Diffstat (limited to 'tests/imageutils-lodepng.cc')
-rw-r--r-- | tests/imageutils-lodepng.cc | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/tests/imageutils-lodepng.cc b/tests/imageutils-lodepng.cc deleted file mode 100644 index 8460d9e..0000000 --- a/tests/imageutils-lodepng.cc +++ /dev/null @@ -1,24 +0,0 @@ -#include "lodepng.h" -#include <stdio.h> - -bool write_png(const char *filename, unsigned char *pixels, int width, int height) -{ - //encoder.settings.zlibsettings.windowSize = 2048; - //LodePNG_Text_add(&encoder.infoPng.text, "Comment", "Created with LodePNG"); - - size_t dataout_size = -1; - unsigned char *dataout = (unsigned char *)malloc(width*height*4); - LodePNG_encode(&dataout, &dataout_size, pixels, width, height, LCT_RGBA, 8); - //LodePNG_saveFile(dataout, dataout_size, "blah2.png"); - - FILE *f = fopen(filename, "wb"); - if (!f) { - free(dataout); - return false; - } - - fwrite(dataout, 1, dataout_size, f); - fclose(f); - free(dataout); - return true; -} |