# P5 JS random/shuffle pixels

**URL:** <https://discourse.processing.org/t/p5-js-random-shuffle-pixels/4508>\
**Category:** Coding Questions\
**Created:** [October 15, 2018, 9:04pm UTC](https://discourse.processing.org/t/p5-js-random-shuffle-pixels/4508 "2018-10-15T21:04:39Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [October 15, 2018, 10:09pm UTC](https://discourse.processing.org/t/p5-js-random-shuffle-pixels/4508/7 "2018-10-15T22:09:13Z")

</div>

> <https://gist.github.com/GoSubRoutine/dd290c28663ef13aaf2f1b5e8d0adffa>

> [@Pushing a 7712x960 Binary image to p5.js is Super slow. Is there a better way?](https://discourse.processing.org/t/pushing-a-7712x960-binary-image-to-p5-js-is-super-slow-is-there-a-better-way/371/8):
>
> Made my own version using a DataView + its method setInt32() as a wrapper to write to pixels[] 4 bytes (RGBa) at once: grinning Dunno whether it’s faster or not, but you can check it out online here: clown_face /\*\* \* Fill Image with Random Gray (v1.0.3) \* GoToLoop (2018-May-26) \* \* https://Discourse.Processing.org/t/ \* pushing-a-7712x960-binary-image-to-p5-js- \* is-super-slow-is-there-a-better-way/371/8 \* \* Bl.ocks.org/GoSubRoutine/dd290c28663ef13aaf2f1b5e8d0adffa \*/ "…

---

_[View the full topic](https://discourse.processing.org/t/p5-js-random-shuffle-pixels/4508)._
