Searching for images by resolution and size for Node.js
It's synchronous flexible module for relatively small tasks.
npm install find-images
FindImages(input[, resolution, size_limit])
Type: String | Array
Could be a path to images folder or an array of images
Type: String
Default: 100%x100%
Searching for images with this resolution. To ignore width or height, just set it's value as a percentage: 100%x250
. To skip this option leave it empty ''
or set it to null
.
Type: Number
Filter results by size (in KB)
const FindImages = require('find-images');
let results = FindImages(input, '540x100%', 500);
// => [{ path: '/test/540x180.jpg', resolution: '540x180', size: '70.08' }]
[
{
path: '/test/540x180.jpg',
resolution: '540x180',
size: '70.08'
},
]
- updated for new version of
ReadDirRec
- removed async method
- fixed bug, when size string was extracted with space
- fixed crash due to an
unsupported file type
error