A small snippet that crops screenshots from social media platforms like Instagram to only contain the picture. This is done by looking for the first row / column on the top / bottom / top / left of the screen (Starting from the center) where all pixels are the same color. This -usually- marks the end of a picture.
This tool is NOT perfect and compression algorithms like JPEG might mess up the working of this tool. It's more of a "Best guess" method.
- Install "PIL" for Python:
python -m pip install Pillow