1.0.1 • Published 6 months ago
blank-image-lib v1.0.1
Blank Image Library
Generate blank WebP images with custom sizes and colors.
Installation
npm install blank-image-lib
Usage
const blankImageLib = require('blank-image-lib');
// Generate a blank image
const image = blankImageLib.createImage({
width: 800,
height: 600,
color: '#FF0000' // Red
});
// Save the image
image.save('output.webp');
API
createImage(options)
- options.width (Number): Image width in pixels
- options.height (Number): Image height in pixels
- options.color (String): Hex color code (default: '#FFFFFF')
Returns an Image object with a save() method to write the image to disk.