output base64 images as Jitter matrix

John J.A. Jannone's icon

I'm receiving base64 PNG files from an http request - I'd like to convert these to Jitter matrices, presumably in node.js. I'm currently saving them as files (see https://cycling74.com/forums/saving-large-base64-images-with-node-js). Anybody tried this?

Federico-AmazingMaxStuff's icon

Hey John!

There are surely lots of node modules to convert from base64 to rgb numbers or image files.
I've found this one for example:
https://www.npmjs.com/package/base64-img

I don't think Node in Max has any idea what a jitter matrix is, so you either output the image as a list of rgb numbers, or you let node save the image into your hard drive and then read it back with a jitter matrix

John J.A. Jannone's icon

Hi Federico!

>I don't think Node in Max has any idea what a jitter matrix is,

Indeed. It would be nice to see more of the Max js API available in node.js

>you let node save the image into your hard drive and then read it back with a jitter matrix

Yes, that's what I'm doing - it works, I just find the temp files inelegant :)

Hope you are doing very well!