encodePng
Encodes the image as deterministic PNG bytes.
The result uses exactly one IHDR, one IDAT, and one IEND chunk in that order, RGBA8 noninterlaced scanlines with filter zero, deterministic stored DEFLATE blocks of at most 65,535 bytes, and CRC32 and Adler32 checksums. No metadata, timestamps, gamma conversion, or platform encoder state is included. Equal image sizes and pixels encode byte-for-byte identically on every supported JVM and operating system, and every returned array is fresh and independent.
Return
a fresh byte array containing the PNG.
Throws
when checked PNG size arithmetic cannot be represented.