https://github.com/ifera/image-squarer
A simple python script to convert portrait or landscape images to a square (ideally for Instagram posts)
https://github.com/ifera/image-squarer
image-square instagram landscape portrait posts python script turn-image-to-square
Last synced: 10 months ago
JSON representation
A simple python script to convert portrait or landscape images to a square (ideally for Instagram posts)
- Host: GitHub
- URL: https://github.com/ifera/image-squarer
- Owner: Ifera
- License: gpl-3.0
- Created: 2022-09-23T16:51:58.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-24T17:53:10.000Z (over 3 years ago)
- Last Synced: 2025-02-10T11:11:14.630Z (12 months ago)
- Topics: image-square, instagram, landscape, portrait, posts, python, script, turn-image-to-square
- Language: Python
- Homepage:
- Size: 1.77 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### image-squarer
A simple python script to convert portrait or landscape images to a square (ideally for Instagram posts)
### Requirements
- Python 3.7+
- OpenCV
### How to use
- Download or clone the repository
- Use `python main.py --path --out [out]`
### Available arguments
- `--path`: Either a path to the image or path to a directory containing images or subdirectories (can be nested as well)
- `--out`: Name for the output folder, defult: "export"
- `--loop`: When a directory in provided `--path` then this should also be passed
- `--size`: [Optional], provide a custom size for the output image
- `--color`: [Optional], border color, default: (255,255,255) in BGR format
### Examples
| Input Image | Output Image |
|:------------------:|:-------------------:|
|  |  |
|  |  |