Skip to content

This small tool ensures uniform image sizes by making them equal. It is primarily for internal use, so I won't provide extensive details here. However, feel free to utilize it if you have a clear understanding of its purpose.

License

Notifications You must be signed in to change notification settings

vpray-uk/img-resizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

img-resizer

This script enables batch processing of images by adjusting canvas size, resizing them, and adding a watermark logo. It is designed for individuals who possess numerous images of varying sizes and wish to make them uniform in terms of dimensions.

Make sure to config the settings.json properly. All the related folders and a logo must be at the same level of the module.

Requires Node.js to run. Please download and install NodeJS first: https://nodejs.org/en

Usage

npm run start

Build to an executable

npm run build

settings.json

{
  "inputPath": "./input-images/",
  "outputPath": "./output-images/",
  "watermarkLogoFile": "./logo.png",
  "images": {
    "resizeSize": 2048,
    "outputSize": 2048
  },
  "watermark": {
    "opacity": 1
  }
}

inputPath - the input folder that contains the images that need to be processed.

outputPath - the output folder of the processed images.

watermarkLogoFile - the watermark image path.

images.resizeSize - the size of the image before stamping the watermark.

images.outputSize - the final image size with the watermark stamped.

watermark.opacity - how transparent the watermark should be.

About

This small tool ensures uniform image sizes by making them equal. It is primarily for internal use, so I won't provide extensive details here. However, feel free to utilize it if you have a clear understanding of its purpose.

Resources

License

Stars

Watchers

Forks

Packages

No packages published