2014-05-28 12:56:42 +08:00
|
|
|
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
|
|
|
#include "stb_image_write.h"
|
|
|
|
|
2014-05-31 19:49:43 +08:00
|
|
|
#define STB_IMAGE_IMPLEMENTATION
|
|
|
|
#include "stb_image.h"
|
2014-05-28 12:56:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
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;
|
2014-05-29 02:05:17 +08:00
|
|
|
}
|