Images for use in test-cases
npm install image-testdata
The following example demonstrates how to use this module:
const imageTestdata = require('image-testdata')
const fs = require('fs')
Promise.all([
// Image without XMP:Identifier
imageTestdata('no-xmp-identifier.jpg', 'tmp'),
// Image with XMP:Identifier
imageTestdata('with-xmp-identifier.jpg', 'tmp'),
// Save by another name
imageTestdata('with-xmp-identifier.jpg', 'tmp', {renameTo: 'img.jpg'})
])
.then((files) => console.log('Return value', files))
.then((files) => console.log('Directory listing', fs.readdirSync('tmp')))
This will generate the following output
Return value [ 'tmp/no-xmp-identifier.jpg',
'tmp/with-xmp-identifier.jpg',
'tmp/img.jpg' ]
Directory listing [ 'img.jpg', 'no-xmp-identifier.jpg', 'with-xmp-identifier.jpg' ]
image-testdata
is published under the MIT-license.
See LICENSE.md for details.
For release notes, see CHANGELOG.md
See CONTRIBUTING.md.