rest of image-test case

This commit is contained in:
Sean Barrett
2014-05-27 21:56:42 -07:00
parent f0976fd312
commit 1d2770394a
2 changed files with 111 additions and 0 deletions

15
tests/image_test.c Normal file
View File

@ -0,0 +1,15 @@
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
#define STBI_HEADER_FILE_ONLY
#include "stb_image.c"
int main(int argc, char **argv)
{
int w,h;
unsigned char *data = stbi_load(argv[1], &w, &h, 0, 4);
if (data)
stbi_write_png("c:/x/result.png", w, h, 4, data, w*4);
return 0;
}