ConstBorrowed 8-bit interleaved pixels for encodeAutoMoviePng. The encoder reads without mutation and returns padded base64 PNG bytes without a data: prefix; image identity is assigned separately by the caller.
Output uses bit depth 8, no interlace, filter zero and stored deflate blocks, with no compression or color-management metadata. Dimensions/channel count/buffer length are checked before encoding; host allocation failures still propagate.
Bytes per pixel: 1 grayscale, 2 grayscale/alpha, 3 RGB, 4 RGBA; this order is preserved.
Positive safe integer rows in pixels, checked by the encoder.
Row-major interleaved samples in supplied row order, exactly widthheightchannels bytes. The encoder performs no vertical flip, premultiplication or color conversion.
Positive safe integer columns in pixels, checked by the encoder.
Padded base64 of the PNG file, without a data: prefix
Encode raw 8-bit pixels as a PNG file in the padded base64 an
IAutoMovieImagecarries, for an image code generates together with a model.The file is a signature,
IHDR, oneIDATandIEND(PNG, W3C second edition, sections 5, 11.2): bit depth 8, non-interlaced, colour type 0, 4, 2 or 6 for one to four channels, which is the subset engine admission and the viewer decode. Each scanline takes filter type 0, and the zlib stream (RFC 1950) holds the filtered bytes in stored deflate blocks of at most 65,535 bytes (RFC 1951 section 3.2.4), with the Adler-32 of the uncompressed data; each chunk ends in the CRC-32 of its type and data. Stored blocks keep the encoder a few lines and the output a pure function of the pixels, at the cost of no compression: the file is the raw size plus about 0.1 percent. Base64 follows RFC 4648 section 4 withoutBufferorbtoa, so the bytes are the same in Node and every browser.