I am using imagemagick library for resizing image to fit for the UI specification,
I have installed imagemagick by following cmd: sudo npm install imagemagick
Installation is done correctly, but i am getting the error while resizing,
My code :
var im = require('imagemagick');
im.resize({
srcPath:"/tmp/"+imageName,
dstPath:"/home/image/" + imageName,
width:43,
height :43,
}, function(err, stdout, stderr){
if (err) {
console.log('error while resizing image ' + err);
}
});
I am getting the following error:
Error: Command failed: execvp(): No such file or directory
dstPath:"/home/image/" + imageName,
Edit: Have you installed imagemagick library? If not then you have to install it. If you are in ubuntu do apt-get install imagemagick