An aggressively optimized png loader for javascript that decodes png
images 8x
faster than alternatives. See benchmark:
Decoding a 4096x4096 RGB
image:
Algorithm | timing (s) |
---|---|
this | 0.5 |
pngtoy | 4.1 |
HTML Image | 1.5 |
This can handle following kinds of png
formats:
gray 8bit
gray 16bit
RGB
RGBA
See in example.mjs
for a sample usage
node --experimental-modules --napi-modules example.mjs
- Just
import LoaderPNG from "./LoaderPNG";