Python

Batch Image editor using Python

If we want to modify (resize, change file format, etc.) a single image. It is an easy job, just open a favorite image editor and do the modification. But what if you want to modify hundreds and hundreds of such images? It not only becomes time-consuming and boring also.

Read more..


This is the place where Python and the Python Imaging Library (PIL) comes into play. By making use of python script you can process images in bulk.

In this project, we are going to create a small Python script that will allow us to resize, crop, blur or convert images into greyscale on a large scale.

Project Description

The objective of this project is to modify the images on a large scale at a time without manual intervention. So, by using the python script and PIL library we will build the project.

In this project, we have to specify the path of the directory where all images are stored, at the time of compilation as a command-line argument. Suppose project name is project_name.py, then at execution time write command like python3 project_name.py path/to_directory/where/images_are_stored/*.png

Then a prompt will ask which operation to perform, like 1 for resizing, 2 for cropping, 3 for blurring and so on. Give a proper input then you will get the modified image.

Python Modules used for projects:

sys: sys-module is used to provide access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter. We are going to use sys.argv to list out the command line arguments passed to Python script. The argument that we passed in the command line is the path of the directory where all images reside.


Latest projects on Python

Want to develop practical skills on Python? Checkout our latest projects and start learning for free


Python Imaging Library (PIL): PIL offers many standard procedures for image manipulation such as pre-pixel manipulation, image filtering, blurring, contouring, smoothing or edge detection, adding text to images and much more. It is also used to load images from the hard drives and display the image.

OS – Module: os–module provides all the functionalities of interacting with the operating system. OS-module provides an easy way of interacting with os dependent functionalities. It is distributed under Python standard utility library.

Project Implementation

Follow the below steps to complete the project:

  • Loop through all the images one by one. Ask the user to give what modification to perform on the image.
  • While executing the script give the path of the directory where images are stored. (to process all the images, give path like /path/todirecory/ * .jpeg)
  • According to the choice of the user, modify the image using PIL library methods.
  • Using the os module split the filename into name and extension and store it in two variables.
  • Save those newly generated images with some modified names (like oldname+ ‘_edited.png’)
  • When all images are done loop will terminate and you are done with your work.

Software requirements: Text editor and Python3.

Programming Languages and module: Python, PIL-module, os module, sys-module.


How to build Python projects Did you know

Skyfi Labs helps students learn practical skills by building real-world projects.

You can enrol with friends and receive kits at your doorstep

You can learn from experts, build working projects, showcase skills to the world and grab the best jobs.
Get started today!


Kit required to develop Batch Image editor using Python:
Technologies you will learn by working on Batch Image editor using Python:
Batch Image Editor using Python
Skyfi Labs Last Updated: 2021-05-04





Join 250,000+ students from 36+ countries & develop practical skills by building projects

Get kits shipped in 24 hours. Build using online tutorials.

More Project Ideas on Python

Face recognition using Raspberry Pi
Linux Based Medication remainder
Ultrasonic beats player
Automated door opener with lighting control
IoT based theft detection using Raspberry Pi
Wheelchair wih safety system
Raspberry Pi osilloscope
Health monitoring using Raspberry pi
Automatic Green house system
Wheel combined robotic suspension system
Bank Account Management System using SQL and C++
Content Aggregation Project using Python
URL Shortener
Develop An Expense Tracking System using Python
Mp3 Player using Python
Simple Chat room using Python
Folder sorter according to files extensions using Python
Batch Image editor using Python
Password Generator and Manager using Python
Web Scrapper (Amazon Price Tracker)
Bird Species detection using Python
Develop An Online CV Builder using Python
Online Job Portal using Python and SQL database
Social Media Site using Python (Django)
Driver Drowsiness detection using Python
Traffic recognition using python
Website Blocker using python
Speech Emotion Recognition using Python
Speed Typing test with Python
Gender and Age Detection using Python
Pharmacy management using Python
Virtual Notebook - Python project
Find My Professor
How to Develop a TIC TAC TOE game using Python
Admission tracking system
Assignment submission system using Python
Smart feedback system using Python
Data collection tool using Python
Language translator and converter using Python
Automatic Brand LOGO detection using Python
Rock, paper, scissor game using python
Youtube video downloader with Tkinter UI python project
Instagram bot using python
Desktop notifier app using python
Spotify song downloader using python
Jarvis Personal assistant using Python
Sound processing python project
Develop a Supermarket Billing System with Python
Desktop voice assistant project

Subscribe to receive more project ideas

Stay up-to-date and build projects on latest technologies