Skip to content

Danotsonof/crop_image_nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node script to crop an image from a folder, rotate it thru a 90 degrees anticlockwise and save the resulting image to another folder, then repeat same for the second part of the image (in this case).

npm i

to install packages


Copy your source image to the files folder, edit width, height, left and top values appropriately, then run:

npm start

to crop your image, in files folder, to export folder.

Reference: https://sharp.pixelplumbing.com/api-resize#extract
Many thanks to Lovell

Releases

No releases published

Packages

No packages published