1

I crop an image file by node module imagemagick. It crops successfully, but how to get the names (or paths) of cropped result images

My code:

const im = require('imagemagick');
....
const imgFile = "img.png";
im.convert([imgFile, '-crop', '300x300', 'test.png'],
  function(err, stdout){
    if (err) throw err;
    console.log('stdout:', stdout);
    // here: I want to get names (or paths) of cropped images
    }
)
Vu Le Anh
  • 708
  • 2
  • 8
  • 21

0 Answers0