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 • 0 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