How do I turn a picture into a matrix in nodejs?

  node.js, question

For example, I want to do some simple image processing in node. However, there is no way to convert the picture into a matrix of pixel objects (including rgb values).
I tried to read the image and convert it to base64, but the image header could not be processed.
Is there any way to convert the picture into a matrix? Or a method capable of processing the file header.