Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

More than speed, it's easier working with the Uint8ClampedArray since the values correlate to RGB values (0-255). If it was a matter of speed only, the author would have used Uint32Array, which gets the speed benefit of typed arrays but allows for larger values (meaning smaller overall array size, but it's more complex to work with).

If you hop down to the annotated source, you can see Uint32Array used here:

http://zschuessler.github.io/DeltaE/demos/de76-chroma-key/



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: