gpu.js icon indicating copy to clipboard operation
gpu.js copied to clipboard

How to pass 2D image buffer/array as an input?

Open algj opened this issue 4 years ago • 1 comments

I'm using Node.js. I have a bitmap in a Buffer in such form [R,G,B,A,R,G,B,A,...].

I'm confused how to pass each pixel (R,G,B,A) instead of individual colors to gpu.js. Documentation explains how to do it with img/video browser elements, but not for raw image data.

Edit: I want to get output in the same order [R,G,B,A, ...], not in a canvas or something else, but as an array/buffer.

algj avatar Jan 23 '22 15:01 algj

As part of reviving the project, we're closing stale support questions and version-specific reports from older releases. A lot changed today: 2.17.0–2.19.2 shipped and are on npm (npm install gpu.js), installs work on modern Node, new GPU() works in current browsers, Apple Silicon precision issues are fixed, and CI now guards every change. If this is still relevant on [email protected], please open a fresh issue with a repro — happy to help. (See #807 for the full status update.)

fuzzie360 avatar Jul 22 '26 15:07 fuzzie360