Png Codec
object PngCodec
Reads and writes Rasters as PNG through javax.imageio.
Writing always produces 8-bit RGBA, and the same raster always encodes to the same bytes on the same JDK. Reading accepts any PNG colour type and bit depth and returns the stored sample values without colour management: a gray PNG reads back as the gray levels it holds, not as a linear-to-sRGB conversion of them, and gamma or ICC chunks are ignored.
Streams are buffered in memory rather than through ImageIO's temp-file cache, so no call here touches global ImageIO state or the file system beyond the given path.