Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 1.06 KB

Readme.md

File metadata and controls

39 lines (31 loc) · 1.06 KB

Dependency Status NPM version Build Status Endorse

Instalation

npm install image-size

Usage

var sizeOf = require('image-size');
var dimensions = sizeOf('images/funny-cats.png');
console.log(dimensions.width, dimensions.height);
Async version
var sizeOf = require('image-size');
sizeOf('images/funny-cats.png', function (err, dimensions) {
  console.log(dimensions.width, dimensions.height);
});

Supported formats

  • BMP
  • GIF
  • JPEG
  • PNG
  • PSD
Upcoming
  • TIFF
  • WebP
Credits

not a direct port, but an attempt to have something like dabble's imagesize as a node module.