Open
Description
@targos Thanks for such a nice library! Just sharing something I found unexpected (after trying to switch to fast-png
from pngjs
):
- If you want to manipulate pixel data after decoding an indexed image, you have to normalize it into RGBA (from palette + indices) manually. This is 1) not documented, 2) inconvenient. Maybe worth adding a
normalize
option todecode
? - The format of the
palette
property is[[r, g, b], [r, g, b]]
, which is inefficient — allocating more memory than necessary. Since we know the number of colors before hand, ideally this would be returned in flat typed form —Uint8ClampedArray([r, g, b, r, g, b, ...])
.
Metadata
Metadata
Assignees
Labels
No labels