Lines Matching refs:png
11 #include <libpng/png.h>
22 png_structp png;
40 png = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
41 if (png == NULL) {
47 png_init_io(png, fb_out);
48 info = png_create_info_struct(png);
51 png_destroy_write_struct(&png, NULL);
55 if (setjmp(png_jmpbuf(png))) {
56 ALOGE("failed png setjmp\n");
57 png_destroy_write_struct(&png, NULL);
63 png_set_IHDR(png, info,
67 png_write_info(png, info);
72 png_destroy_write_struct(&png, NULL);
83 png_write_row(png, (png_bytep)imgbuf);
86 png_write_end(png, info);
88 png_destroy_write_struct(&png, NULL);
100 "usage: screenshot [-s soundfile] filename.png\n"
102 " -i: autoincrement to avoid overwriting filename.png\n"
107 FILE *png = NULL;
142 snprintf(outfile, PATH_MAX, "%s-%d.png", base, ++i);
157 png = fopen(outfile, "w");
158 if (!png) {
164 take_screenshot(fb_in, png);