Skip to content

Python script that batch-resizes all images in a folder.

License

Notifications You must be signed in to change notification settings

mattsteen14/img_resizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn

Batch Image Resizer (with Aspect Ratio Support)

Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

About The Project

img_resizer is a simple command-line Python tool that batch-resizes all images in a folder. You can resize images by specifying a new width, with the height calculated automatically to maintain the aspect ratio — or provide both dimensions manually. You can also overwrite the original images or save resized versions to a separate folder.

(back to top)

Built With

(back to top)

Getting Started

These are instructions for setting up the project locally. To get a local copy up and running, follow these simple steps.

Prerequisites

Ensure you have the following software installed before proceeding:

  • Python 3.6 or higher: Check with:

    python3 --version
  • The Pillow image library

    Install Pillow using pip:

    pip install pillow

Installation

  1. Clone the repository:

    git clone https://github.com/mattsteen14/img_resizer.git
  2. In the terminal, navigate into the project directory:

    cd img_resizer
  3. Install the required Python packages:

    pip install -r requirements.txt
  4. Run the script from the terminal using:

    python3 datxt.py <folder_path> --width <new_width> [--height <new_height>] [--inplace]
    • folder_path — The folder containing images to resize (must be quoted if it contains spaces)
    • --width — Required. The new width for the images (in pixels)
    • --height — Optional. If provided, will force images to resize to this exact height
    • --inplace — Optional. If included, the original images will be overwritten. If omitted, resized images will be saved to a new folder (<original_folder>_resized)

    Hint:

    Instead of typing the full paths, just drag & drop the folder into the terminal.

(back to top)

Roadmap

  • Plan project.
  • Write code.
  • Test on images folder.
  • Version control. Set up on GitHub.
  • Push to GitHub.
  • Testing and dubugging.
  • Additional features.
  • Create simple GUI interface.

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project.

  2. Create your Feature Branch:

    git checkout -b feature/AmazingFeature
  3. Commit your Changes:

    git commit -m "Add some AmazingFeature"
  4. Push to the Branch:

    git push origin feature/AmazingFeature
  5. Open a Pull Request.

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Matt Steen-Brookes - @mattsteen14 - [email protected]

Project Link: https://github.com/mattsteen14/img_resizer

(back to top)

Acknowledgments

(back to top)

About

Python script that batch-resizes all images in a folder.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages