Answers for "width and height with node js"

0

width and height with node js

var sizeOf = require('image-size');
sizeOf('images/funny-cats.png', function (err, dimensions) {
  console.log(dimensions.width, dimensions.height);
});
Posted by: Guest on August-20-2021
0

width and height with node js

gm = require('gm');

// obtain the size of an image
gm('test.jpg')
.size(function (err, size) {
  if (!err) {
    console.log('width = ' + size.width);
    console.log('height = ' + size.height);
  }
});
Posted by: Guest on August-20-2021

Code answers related to "width and height with node js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language