Create pixel-perfect iPhone mockups by placing screenshots inside Apple device frames.
Uses a flood-fill masking algorithm to ensure content only appears within the screen area -- no leaking through rounded corners.
The device frame PNGs have two transparent regions: the outer rounded corners and the inner screen area. A simple alpha check would bleed content through the corners. Instead, flood-fill starts from the screen center and finds only the connected inner transparent region, creating a precise mask.
pipx install git+https://github.com/weirdapps/mockups.gitThis installs mockup as a standalone command in an isolated environment. Install pipx with brew install pipx if needed.
pip install git+https://github.com/weirdapps/mockups.git# Basic (default: iPhone 16 Pro Max Black Titanium)
mockup screenshot.png
# Custom output path
mockup screenshot.png mockup.png
# Different frame
mockup screenshot.png --frame 16_pro_black
# List available frames
mockup --list-framesfrom mockups import create_mockup
output = create_mockup(
screenshot_path="screenshot.png",
output_path="mockup.png",
frame_key="16_pro_max_black",
)| Key | Device |
|---|---|
16_pro_max_black |
iPhone 16 Pro Max - Black Titanium (default) |
16_pro_max_natural |
iPhone 16 Pro Max - Natural Titanium |
16_pro_max_white |
iPhone 16 Pro Max - White Titanium |
16_pro_max_desert |
iPhone 16 Pro Max - Desert Titanium |
16_pro_black |
iPhone 16 Pro - Black Titanium |
16_pro_natural |
iPhone 16 Pro - Natural Titanium |
- Format: PNG or JPG (any size, automatically resized)
- Best results: Use clean screenshots without existing frame artifacts
- Format: PNG with transparent background
- Resolution: Full frame dimensions (1520x3068 for Pro Max, 1406x2822 for Pro)
git clone https://github.com/weirdapps/mockups.git
cd mockups
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
pytest- Device frame images are based on Apple's publicly available product imagery. iPhone is a trademark of Apple Inc., registered in the U.S. and other countries. This project is not affiliated with or endorsed by Apple.
- Built with Pillow and NumPy.
MIT