readPngDimensions
readPngDimensions(
bytes):PngDimensions
Defined in: packages/declarative-hex-worlds/src/asset-source/png-dimensions.ts:28
Read the pixel width + height from a PNG’s IHDR chunk. Accepts the raw file bytes
(a Uint8Array/Buffer). Throws if the data isn’t a PNG or is too short to hold
an IHDR — a caller feeding a non-PNG should fail loudly, not silently mis-size.
Parameters
Section titled “Parameters”Uint8Array