npm

Need private packages and team management tools?Check out npm Orgs. »

native-thumber

0.0.1 • Public • Published

native-thumber

Node module : Very fast resize / crop Image with Native ImageMagick Librairy in coffee for node.js

Build Status

You need :

sudo apt-get install libmagick++-dev

Installation

npm install native-thumber

USECASE

uploadService = require 'native-thumber'


config =
  store: 'locale'
  directory: 'upload/'
  schemas: [
    {version: 'thumb', size: '50x50', quality: 75},
    {version: 'box', size: '380x380'}
  ]

uploader = new uploadService(config)

uploader.process path, filename, size, () ->
  console.log "Successfully"

or another config


config =
  store: 's3'
  s3Path:'./config/s3.json'
  bucket: 'bucketname'
  directory: 'upload/'
  quality: 80
  resizeStyle: 'aspectfill'
  gravity: 'Center'
  ifOriginal: false
  schemas: [
    {version: 'thumb', size: '50x50', quality: 75},
    {version: 'box', size: '380x380', blur: 5, flip: true}
  ]

uploader = new uploadService(config)

uploader.process item.fd, filename, item.size, () ->
  console.log "Successfully"

install

npm i native-thumber

Downloadsweekly downloads

0

version

0.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability