2.0.0 • Published 6 years ago
smallest-jpeg v2.0.0
smallest-jpeg
A Buffer
of the theoretically smallest JPEG
const smallestJpeg = require('smallest-jpeg');
//=> <Buffer ff d8 ff db 00 43 00 03 02 02 02 02 02 03 02 02 02 03 ...>
smallestJpeg.length; //=> 107
Suitable for test fixtures.
const {width, height} = someJpegParserFunction(smallestJpeg);
console.assert(width === 1);
console.assert(height === 1);
Installation
npm install smallest-jpeg
API
const smallestJpeg = require('smallest-jpeg');
smallestJpeg
Type: Buffer
License
ISC License © 2018 Shinnosuke Watanabe