Skip to content

Lasyin/batch-resize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

batch-resize

Python script to resize every image in a folder to a specified size.

Arguments

-h or -help
	- List arguments and their meanings
-s or -size
	- New pixel value of both width and height.
-x or -width
	- New pixel value of width
-y or -height
	- New pixel value of height
-t or -scale
	- Scales pixel sizes

Example Usage

python batch_resize.py -d folder_name -s 128
-> Resizes all images in 'folder_name' to 128x128px

python batch_resize.py -d full/path/to/image_folder -x 128 -y 256
-> Resizes all images in 'image_folder' (listed as a full path, do this if you're not in the current working directory) to 128x256px

python batch_resize.py -d folder_name -t 2
-> Resizes all images in 'folder_name' to twice their original size

Accepted Image Types:

- Jpg, Png, Bmp (more can easily be added by editing the 'accepted_types' list in the python file)

Dependencies

- Pillow, a fork of PIL.
  - Download from pip:
    - pip install Pillow
  - Link to their Github:
    - https://github.com/python-pillow/Pillow

About

Python script to resize every image in a folder to a specified size

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages