Skip to content

A simple Python util to automatically add a banner at the bottom of your images

License

Notifications You must be signed in to change notification settings

SkytAsul/PhotoBanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhotoBanner

This simple Python util automatically adds an image banner at the bottom of all your images at once.

Installation

Either download or clone all of the repository locally and run

$ pip install -r requirements.txt

Otherwise, install opencv-python manually by calling

$ pip install opencv-python

and download the banner.py file.

Usage

Put all of your images in the images directory. You can put multiple folders here to keep a hierarchy.
You must put your banner image in the root directory and name it banner.jpg. You can use another format, but you'll have to edit the banner.py file accordingly.

banner.py
banner.jpg
images
├── landscape.png
├── portraits
│   ├── portait1.jpg
│   └── portrait2.png
└── animals
    └── cat.jpg

Then, launch the Python file:

$ python3 banner.py

20:01:47:850.0 - INFO - Processing images/DSC01697.JPG...
20:01:48:202.0 - INFO - Resized banner from 147x1727 to 511x6000
20:01:48:819.0 - INFO - Processing images/random-pics/1673554186092.jpeg...
20:01:48:927.0 - INFO - Resized banner from 147x1727 to 184x2160
20:01:49:134.0 - INFO - Processing images/random-pics/2023wrapped_summary-share.jpeg...
20:01:49:157.0 - INFO - Resized banner from 147x1727 to 92x1080
...

You will find the pictures with banner added in the imagesProcessed folder.

Notes

The banner can have any size and aspect ratio. It will be automatically scaled to match the size of the images.

About

A simple Python util to automatically add a banner at the bottom of your images

Topics

Resources

License

Stars

Watchers

Forks

Languages