If you build native iOS, iPad mobile or desktop applications you know that you need to create screenshots for the App Store. This can be a tedious process, especially if you have a lot of screenshots to create. Here's an open source python script I made that has been working great for me. It's easy to use and can save you a lot of time.
Follow the tutorial here: https://ericdavidsmith.com/blog/software/ios-app-store-screenshot-icon-generator-python
To run this Python script, you need:
Clone this repo first
git clone https://github.com/erictherobot/app-icon-generator.git
- Python 3.x installed
- PIL (Pillow) for image manipulation
- A TrueType font (in this example, Baloo-Regular.ttf)
Install Pillow with pip:
pip install pillow
The script takes an original image and layers it with marketing text to create device-specific screenshots. It performs several operations:
- Rounding Corners:
round_corners()
function rounds the corners of an image. - Text Addition: Marketing titles and taglines are added to the canvas.
- Image Placement: The original image is resized and placed on the canvas.
- Saving: The final canvas is saved as a PNG file.
- Canvas Color: Change the
"#1f1f1f"
inImage.new()
to your desired background color. - Font: Replace "Baloo-Regular.ttf" with another TrueType font.
- Device Dimensions: Edit
device_dimensions
dictionary to add/remove devices. - Text Position: Modify
title_y
,subtitle1_y
, andsubtitle2_y
to adjust text positioning.
- Save the script as
generate_screenshots.py
. - Download or create a
.ttf
font file and place it in the same directory as the script. - Place the original image in the same directory.
Run the script:
python generate_screenshots.py original.png "My App" "Best App Ever" "Download Now"
- Automated: Generate multiple screenshots with a single command.
- Consistent: Ensures uniformity across all device-specific screenshots.
- Efficient: Reduces manual effort and human error.
Once the script is run, it will generate PNG files in the format marketing_{device}_{timestamp}.png
.
MIT
Eric David Smith
Follow the tutorial here: https://ericdavidsmith.com/blog/software/ios-app-store-screenshot-icon-generator-python