Create Your Screenshots for the Stores With Python and PIL

Alexis Gomes
Geek Culture
Published in
5 min readMar 19, 2021

--

I have published mobile apps for the play store and the app store. But formatting the screenshots for the stores is a long and boring task. You need to crop your screenshots, add a background and some text to highlight your keys feature. You have to repeat it for each different screen size. And do it again for all languages supported by your app.

So as a lazy developer I made a python script to automate these tasks and generate images ready to upload on the store.

The only package you will need to follow this article is Pillow or PIL. But I recommend not to use PIL since it’s not maintained.

For the first part of this article, I will use a screenshot of an iPhone emulator. And will focus on creating the image for a 6.5inch screen device, so I have to create a 1284 x 2778 image.

You can find all the devices size ask by Apple here

Open and show your screenshot

from PIL import Image

# Load your image
screenshot = Image.open(PATH_TO_YOUR_IMAGE)
# Open a window to show it
screenshot.show()
# You can get the size of you image with
width, height = screenshot.size

Crop the screenshot

--

--