This is a Python 3 commandline tool which essentially automates what I was doing by hand before in GIMP.
It takes three arguments:
- (Required) the image file name to 'instagramize'
- (Optional) the pixel radius of the gaussian blur applied to the background. The default is 10.
- (Optional) the border radius around the image. The default is no border.
python3 instagramize.py mycoolphoto.jpg
or to define gaussian blur:
python3 instagramize.py mycoolphoto.jpg 15
or to define gaussian blur and border radius:
python3 instagramize.py mycoolphoto.jpg 15 10
This will create an instagramized photo under the same directory with the name
Visual examples (taken by yours truly :wink:):
- Horizontal photo:
- Vertical photo:
- Scale image to 2048px. What this means:
- If the photo is landscape, the horizontal side should go to 2048 as background, and overlayed with the photo with height set to 2048px
- The opposite is true for portrait photos
- Via some math, the image is pasted in a centered fashion over the background image, which is just the same image, but covering the 2048 x 2048 square, and blurred for nice effect
- The image is cropped to the correct 2048 x 2048 square and exported
That's it. Enjoy!