Skip to content

A simple Python script to batch resize images in a folder to a specified width, maintaining aspect ratio.

Notifications You must be signed in to change notification settings

Kerim-N/Image-resizer-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Image Resizer

A simple Python script to batch resize images in a folder to a specified width, maintaining aspect ratio.

Features

  • Resizes .png, .jpg, and .jpeg images
  • Maintains original aspect ratio
  • Saves resized images to a specified output folder
  • Command-line interface

Requirements

Install Pillow with:

pip install pillow

Usage

python resizer.py <input_folder> <output_folder> <width>
  • <input_folder>: Path to the folder containing images to resize
  • <output_folder>: Path to the folder where resized images will be saved
  • <width>: Target width for resized images (height is calculated automatically)

Example

python resizer.py images/ resized/ 800

Output

  • Resized images are saved in the output folder.
  • The script prints a success or error message for each file.

License

MIT

About

A simple Python script to batch resize images in a folder to a specified width, maintaining aspect ratio.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages