sharpimage v1.0.0
Photo converter
Instruction
- Instal latest Node.js
git clone- Next run
yarnornpm install
How to run
First you must have folder with images, default is sources/YourFolder/YourPictures folder where is all images to convert.
node scriptThe selection menu will appear:
? Folder to convertMandatory field, enter the name of the folder that contains the images, this folder must be in the sources folder
? Select a formatChoose one of three available formats
[jpg, png, webp],jpgis set by default? Select breakpoints e.g. 576,768,992,1200Enter the size of the decimal photos, as a result we will get folders with this name and photos in this humidity. The default breakpoints are set to
576? Maximum photo heightThe inserted number will be responsible for the height of the photos, useful especially when the photo is vertical, then aspect ratio is maintained. The default is
800? Keep foldersThe ability to choose whether to clear the output folder or leave its contents. Choosing
Y- leaves the folder, choosingndeletes the contents of the output folder. The default is set toY
Folder structure
sources
└── lwow
├── IMG_0367.jpg
├── IMG_0368.jpg
└── ...output
└── lwow
├── 576
│ ├── IMG_0367.jpg
│ ├── IMG_0368.jpg
│ └── ...
├── 769
│ ├── IMG_0367.jpg
│ ├── IMG_0368.jpg
│ └── ...
└── 992
├── IMG_0367.jpg
├── IMG_0368.jpg
└── ...6 years ago