Lines Matching defs:png

52 #include "png.h"
273 "jpg", "jpeg", "png", "webp",
305 // support subset decodes - png and jpeg (once SkJpegCodec is
307 if (SkStrEndsWith(path, "png") || SkStrEndsWith(path, "PNG")) {
562 check(r, "images/arrow.png", SkISize::Make(187, 312), false, false, true, true);
563 check(r, "images/baby_tux.png", SkISize::Make(240, 246), false, false, true, true);
564 check(r, "images/color_wheel.png", SkISize::Make(128, 128), false, false, true, true);
565 // half-transparent-white-pixel.png is too small to test incomplete
566 check(r, "images/half-transparent-white-pixel.png", SkISize::Make(1, 1), false, false, false, true);
567 check(r, "images/mandrill_128.png", SkISize::Make(128, 128), false, false, true, true);
568 // mandrill_16.png is too small (relative to embedded sRGB profile) to test incomplete
569 check(r, "images/mandrill_16.png", SkISize::Make(16, 16), false, false, false, true);
570 check(r, "images/mandrill_256.png", SkISize::Make(256, 256), false, false, true, true);
571 check(r, "images/mandrill_32.png", SkISize::Make(32, 32), false, false, true, true);
572 check(r, "images/mandrill_512.png", SkISize::Make(512, 512), false, false, true, true);
573 check(r, "images/mandrill_64.png", SkISize::Make(64, 64), false, false, true, true);
574 check(r, "images/plane.png", SkISize::Make(250, 126), false, false, true, true);
575 check(r, "images/plane_interlaced.png", SkISize::Make(250, 126), false, false, true, true);
576 check(r, "images/randPixels.png", SkISize::Make(8, 8), false, false, true, true);
577 check(r, "images/yellow_rose.png", SkISize::Make(400, 301), false, false, true, true);
677 test_dimensions(r, "images/1x1.png");
678 test_dimensions(r, "images/2x2.png");
679 test_dimensions(r, "images/3x3.png");
680 test_dimensions(r, "images/3x1.png");
681 test_dimensions(r, "images/1x1.png");
682 test_dimensions(r, "images/16x1.png");
683 test_dimensions(r, "images/1x16.png");
684 test_dimensions(r, "images/mandrill_16.png");
717 test_invalid(r, "empty_images/zero-width.png");
718 test_invalid(r, "empty_images/zero-height.png");
758 // Write to a png file.
759 png_structp png = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
760 REPORTER_ASSERT(r, png);
761 if (!png) {
765 png_infop info = png_create_info_struct(png);
768 png_destroy_write_struct(&png, nullptr);
772 if (setjmp(png_jmpbuf(png))) {
773 ERRORF(r, "failed writing png");
774 png_destroy_write_struct(&png, &info);
779 png_set_write_fn(png, (void*) (&wStream), codex_test_write_fn, nullptr);
781 png_set_IHDR(png, info, (png_uint_32)w, (png_uint_32)h, 8,
792 png_set_keep_unknown_chunks(png, PNG_HANDLE_CHUNK_ALWAYS, (png_byte*)"npOl\0npLb\0npTc\0", 3);
793 png_set_unknown_chunks(png, info, gUnknowns, SK_ARRAY_COUNT(gUnknowns));
796 png_set_unknown_chunk_location(png, info, 0, PNG_HAVE_IHDR);
797 png_set_unknown_chunk_location(png, info, 1, PNG_HAVE_IHDR);
800 png_write_info(png, info);
804 png_write_rows(png, &row, 1);
806 png_write_end(png, info);
807 png_destroy_write_struct(&png, &info);
1090 check_color_xform(r, "images/mandrill_512.png");
1121 // Encode the image to png.
1150 codec = SkCodec::MakeFromStream(GetResourceAsStream("images/yellow_rose.png"));
1168 codec = SkCodec::MakeFromStream(GetResourceAsStream("images/index8.png"));
1235 test_conversion_possible(r, "images/yellow_rose.png", false, true);
1371 // This test verifies that we fixed an assert statement that fired when reusing a png codec
1374 std::unique_ptr<SkStream> stream(GetResourceAsStream("images/plane.png"));
1402 auto file = "images/plane_interlaced.png";
1448 test_invalid_images(r, "invalid_images/bad_palette.png", SkCodec::kInvalidInput);
1799 const char* file = "images/crbug807324.png";
1830 const char* path = "images/color_wheel.png";