Expand description
The PNG, written band by band: each band as many rows as fit in
BAND_BYTES of pixels, its rows streamed into the png crate’s encoder
as it is had, so what is held at once is one band — whatever paints or
caches its pieces, and however wide the drawing is.
Enums§
- Band
- Why writing a PNG from bands stopped: the encoder or its writer failed, or a piece couldn’t be had.
- Piece
- A piece of a band,
TILEpixels wide at columncol: a whole tile, at tile rowrow, or a striprowstall starting at pixel rowy— what a band of a drawing too wide for a row of tiles is made of. Either is its straight RGBA pixels,TILEwide, row after row.
Constants§
- BAND_
BYTES - The most pixel bytes a band holds: a band is as many rows as fit, at least one. A drawing up to 16,384 pixels wide fits a whole row of tiles.
Functions§
- bands
- A
width×heightPNG written tooutband by band, each band’s pieces frompiece— whole tiles while a row of them fits inBAND_BYTES, shorter strips otherwise — its rows streamed to the encoder as each band is had, so what is held at once is one band. - png
- The drawing at 1× as a PNG written to
out, band by band. - rows_
per_ band - How many rows a band of a drawing
widthpixels wide holds: as many as fit inBAND_BYTES, its pieces padded to whole tiles, at least one and at most a tile’s.