0.3.0 • Published 5 years ago

image-info-from-stream v0.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

image info from stream

Build Status Coverage Status

introduction

access image size from stream.

support image file types:

  • .jpg
  • .png
  • .gif
  • .bmp

usage

Callback

const getImageInfo = require('image-infor-from-stream');
const stream = fs.createReadStream('test.png');

stream.pipe(
  getImageInfo(res => {
    const { width, height, type } = res;
    const name = `${width}x${height}.${type}`;
  })
);

External Object

const getImageInfo = require('image-infor-from-stream');
const stream = fs.createReadStream('test.png');
const meta = {};

stream
  .pipe(getImageInfo(meta))
  .on('finish', () => {
    const { width, height, type } = meta;
    const name = `${width}x${height}.${type}`;
  });
0.3.0

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago