0.0.6 • Published 5 years ago

pureimage-cache v0.0.6

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

node-pureimage-cache

Image Thumbnail cache built on PureImage. It scales down images Typically it would be used inside of a web-server application. Create an instance of the

const paths = require('path')
const ImageCache = require('../index.js')
const cache = new ImageCache({
    cacheDir:paths.join(__dirname,"thumbnails"), //absolute path of the dir to store thumbnails
    useWorkers:false, //use a background process to do the scaling
})

cache.makeThumbnail({
    width:100,  //desired width
    path: paths.join(__dirname,'bizcard.png'),  //absolute path on disk of the original image
    name: 'bizcard', //name used to generate the cached file on disk
    extension: ImageCache.PNG,
}).then(thumbPath =>{
    console.log("generated a thumbnail on disk at", thumbPath)
})
0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago