insert-logo
v1.0.1
Published
This package allows you insert a logo to any image.
Downloads
5
Maintainers
Readme
Installing
Using npm:
npm i insert-logo
Allowed Types
['.svg', '.png', '.jpeg', '.jpg']
Example Usage
const insertLogo = require('insert-logo')
async function main() {
const options = {
logo_size: 'M', // S, M, L (small, medium, large) - Default = M
logo_position: 'top-left' , // top-left, top-right, bottom-left, bottom-right, center - Default top-left
logo_opacity: 0.8, // min: 0.0, max: 1.0 - Default 0.8
override: true // Allows to override insertedImage - Default false
}
const logoInsertedImage = await insertLogo('image.png', 'logo.svg', options)
if(logoInsertedImage.status === 'error') {
console.log('Error:' + logoInsertedImage.msg)
}
if(logoInsertedImage.status === 'success') {
// see data on logoInsertedImage.data
console.log('Success: Image Generated.')
}
}
main()
Example Output
Logo inserted image will be generated at folder on path:
root/output/insert-logo/{imageName}-li.{imageExtension}