Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

zujoio-archieved/thumbnail-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:collision:

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