npm.io
0.0.8-alpha • Published 7 years ago

@zujo/thumbnail-generator

Licence
ISC
Version
0.0.8-alpha
Deps
8
Size
2.9 MB
Vulns
3
Weekly
0

npm install @zujo/thumbnail-generator

thumbnail all the things

creates a queue of images and converts them asynchronously into thumbnails

Features

  • Resize Image
  • Scale Resize
  • crop image
  • generate multiple resolution of image

Command - Lines And Usage

npm install @zujo/thumbnail-generator

API

const { ScaleThumb,generateThumb,Resize,cropthumbCoor,generateThumbwithsize} = require("@zujo/thumbnail-generator");
Similar Requirement for the all functions
const  filepath = "./test.jpg"
const  jpgpath = path.join(__dirname, './test');
const  fileName = String;
Usage
generateThumb(source, destination  path, imagefileType)
generateThumb(
filepath,
`${jpgpath}/${fileName}`,
`${'.png'}`
)
generateThumbwithsize(source, destination  path, sizes,type)
generateThumbwithsize(
filepath,
`${jpgpath}/${fileName}`,
500,`${'.png'}`
)
ScaleThumb(source, destination  path, type,current_image_width,current_image_height,ratio_with_floating_point)
ScaleThumb(
filepath,
`${jpgpath}/${fileName}`,
`${'.png'}`,
500,500,0.2)
cropthumbCoor(source,destination  path,type,top,left,width,height)
cropthumbCoor(filepath,
`${jpgpath}/${fileName}`,
`${'.png'}`,
20,20,200,200)
Resize(source,destination  path,type,height,width)
Resize(
filepath,
`${jpgpath}/${fileName}`,
`${'.png'}`,
500,500)

installation

npm install @zujo/thumbnail-generator 

Authors and Acknowledgment

Mayank Pandav, Arjun Kava

Thanks And Credits

Akhil Ramani, Chintan Rajpara

Organization

Copyright 2019 Made with By ZUJO

Keywords