Home | History | Annotate | Download | only in png

Lines Matching refs:PNG

5 package png
68 func sng(w io.WriteCloser, filename string, png image.Image) {
70 bounds := png.Bounds()
71 cm := png.ColorModel()
92 paletted = png.(*image.Paletted)
96 io.WriteString(w, "#SNG: from "+filename+".png\nIHDR {\n")
108 io.WriteString(w, "unknown PNG decoder color model\n")
112 // We fake a gAMA output. The test files have a gAMA chunk but the go PNG parser ignores it
113 // (the PNG spec section 11.3 says "Ancillary chunks may be ignored by a decoder").
153 gray := png.At(x, y).(color.Gray)
158 gray16 := png.At(x, y).(color.Gray16)
163 rgba := png.At(x, y).(color.RGBA)
168 rgba64 := png.At(x, y).(color.RGBA64)
173 nrgba := png.At(x, y).(color.NRGBA)
178 nrgba64 := png.At(x, y).(color.NRGBA64)
211 // Read the .png file.
212 img, err := readPNG("testdata/pngsuite/" + fn + ".png")
277 {"invalid-zlib.png", "zlib: invalid checksum"},
278 {"invalid-crc32.png", "invalid checksum"},
279 {"invalid-noend.png", "unexpected EOF"},
280 {"invalid-trunc.png", "unexpected EOF"},
301 f, err := os.Open("testdata/pngsuite/" + fn + ".png")
325 a, err := readPNG("testdata/gray-gradient.png")
329 b, err := readPNG("testdata/gray-gradient.interlaced.png")
339 // The following is an invalid 1x2 grayscale PNG image. The header is OK,
355 The following is a valid 1x1 paletted PNG image with a 1-element palette
357 0000000: 8950 4e47 0d0a 1a0a 0000 000d 4948 4452 .PNG........IHDR
430 benchmarkDecode(b, "testdata/benchGray.png", 1)
434 benchmarkDecode(b, "testdata/benchNRGBA-gradient.png", 4)
438 benchmarkDecode(b, "testdata/benchNRGBA-opaque.png", 4)
442 benchmarkDecode(b, "testdata/benchPaletted.png", 1)
446 benchmarkDecode(b, "testdata/benchRGB.png", 4)
450 benchmarkDecode(b, "testdata/benchRGB-interlace.png", 4)