I am running NodeJS on the server side, and I am trying to do a little automatic image processing to determine the "base color" of the image.
Here are the steps I want to take:
- Take the image (on the remote server, so transferred with the URL) and get its size
- Use dimensions to calculate the center of the image.
- Take a rectangle 10px x 50px (WxL) around the center point
- Get the RGB value for each of these pixels (500 per image)
- Print average pixel value
I know that such things are possible in PHP, but I would like to use Node. I have seen tutorials on using Node-imagick for basic processing (e.g. resizing and cropping), but I don't know where to start with a more advanced analysis like this.
Questions
(a) Is this possible with Node?
(b) What libraries will allow me to do this?
Jascination
source share