Lines Matching defs:png
10 #include "png.h"
21 png_structp png = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
22 SkASSERT(png != nullptr);
23 png_infop info_ptr = png_create_info_struct(png);
25 if (setjmp(png_jmpbuf(png))) {
26 SkFAIL("png encode error");
28 png_set_IHDR(png, info_ptr, width, height, 8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
30 png_set_compression_level(png, 1);
43 png_set_filter(png, 0, PNG_NO_FILTERS);
44 png_set_rows(png, info_ptr, &rows[0]);
45 png_set_write_fn(png, &out, write_png_callback, NULL);
46 png_write_png(png, info_ptr, PNG_TRANSFORM_IDENTITY, NULL);
47 png_destroy_write_struct(&png, NULL);
68 // write to png