Skip to content

Instantly share code, notes, and snippets.

@carlosmcevilly
Created November 18, 2011 20:02
Show Gist options
  • Save carlosmcevilly/1377585 to your computer and use it in GitHub Desktop.
Save carlosmcevilly/1377585 to your computer and use it in GitHub Desktop.
Make labeled default placeholder images for iPad in various orientations
#!/bin/bash
# <basename><orientation_modifier><scale_modifier><device_modifier>.png
export bgcolor=blue
export txtcolor=#FFFFFF
export fontsm=24
export fontlg=48
# PortraitUpsideDown
# LandscapeLeft
# LandscapeRight
# Portrait
# Landscape
export textspecs="-gravity center -stroke none -fill $txtcolor -strokewidth 0";
convert -size 320x480 -depth 8 xc:$bgcolor $textspecs -pointsize $fontsm -draw 'text 0,0 "Default"' Default.png
convert -size 640x960 -depth 8 xc:$bgcolor $textspecs -pointsize $fontlg -draw 'text 0,0 "Default@2x"' Default\@2x.png
convert -size 748x1024 -depth 8 xc:$bgcolor $textspecs -pointsize $fontsm -draw 'text 0,0 "Default-Portrait"' Default-Portrait.png
convert -size 1496x2048 -depth 8 xc:$bgcolor $textspecs -pointsize $fontlg -draw 'text 0,0 "Default-Portrait@2x"' Default-Portrait\@2x.png
convert -size 1024x748 -depth 8 xc:$bgcolor $textspecs -pointsize $fontsm -draw 'text 0,0 "Default-Landscape"' Default-Landscape.png
convert -size 2048x1496 -depth 8 xc:$bgcolor $textspecs -pointsize $fontlg -draw 'text 0,0 "Default-Landscape@2x"' Default-Landscape\@2x.png
convert -size 1024x748 -depth 8 xc:$bgcolor $textspecs -pointsize $fontsm -draw 'text 0,0 "Default-LandscapeLeft"' Default-LandscapeLeft.png
convert -size 2048x1496 -depth 8 xc:$bgcolor $textspecs -pointsize $fontlg -draw 'text 0,0 "Default-LandscapeLeft@2x"' Default-LandscapeLeft\@2x.png
convert -size 1024x748 -depth 8 xc:$bgcolor $textspecs -pointsize $fontsm -draw 'text 0,0 "Default-LandscapeRight"' Default-LandscapeRight.png
convert -size 2048x1496 -depth 8 xc:$bgcolor $textspecs -pointsize $fontlg -draw 'text 0,0 "Default-LandscapeRight@2x"' Default-LandscapeRight\@2x.png
convert -size 748x1024 -depth 8 xc:$bgcolor $textspecs -pointsize $fontsm -draw 'text 0,0 "Default-PortraitUpsideDown"' Default-PortraitUpsideDown.png
convert -size 1496x2048 -depth 8 xc:$bgcolor $textspecs -pointsize $fontlg -draw 'text 0,0 "Default-PortraitUpsideDown@2x"' Default-PortraitUpsideDown\@2x.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment