Skip to content

Makes a jpg image squared by adding borders of specific color

License

Notifications You must be signed in to change notification settings

corneliascode/image_borders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Borders of images

Tip for Instagram

Before After

Introduction

  • In this project I developed a function that creates border to the pictures (mainly for the Instagram).
    We know th issue of photos being cropped, so this script will resolve this issue.

Installation

  • The libraries can be installed using the requirement file with the following code:
    pip install requirements.txt

Usage

  • Can be used with any (JPG) photo or photos for which we want to create a border
  • The code need to be run from the terminal and we should pass the color argument using the RGB format '[0,0,0]' - for each color you should pass a value from 0 ('no color') to 255 ('full color')

E.g.:
python main.py '[0,0,0]'

Function Details

  • Before running the function it is important to have in the same directory with the function: input_images (a folder which should contain image/s for which we want to create the borders) and output_images (a folder which will contain the processed image/s)

  • The function procces all images from the input_images folder

  • All images should have the extension 'jpg'. The script will ignore files with other extensions.

References

Image used as the example from here: https://www.flickr.com/photos/respenda/53229010978/ (thank you!)

About

Makes a jpg image squared by adding borders of specific color

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages