Screenshots

Today sees the submission of my first real iPhone app to Apple. (We’ll have to wait and see how the approval process goes.) It took some time to push it over the finish line, so today I offer you only a brief note on creating screenshots for app submissions.

Capture

It might be worth mentioning the technique used to capture screenshots on the iPhone: You simply hold down the home button and simultaneously press the power button; this causes the phone to emit the camera “shutter” sound, flash the screen, and put an image of the current screen into your photo roll. The image can then be pulled off the phone like any other. This bit of trivia seems widely-known, but I only stumbled across it by chance on the Internet.

Dimensions

Apple suggests that the screenshots submitted with your app be 320×460, i.e. that they omit the 20 pixel status bar at the top of the iPhone’s screen. The images you get from the capture technique given above are full-size 320×480 images, so you’ve got a clipping problem.

Python!

If you’ve got your PNG files in a directory, and you’ve got the Python Imaging Library installed, it’s a snap to clip out the status bar. Just cd to the directory containing the PNGs, fire up Python, and run these commands:

>>> import Image
>>> import os
>>> for fn in os.listdir('.'):
...     if fn[-4:]=='.PNG': Image.open(fn).crop((0, 20, 320, 480)).save(fn)

(This performs a conversion in-place, so copy the directory if you want to preserve the originals.)

Share and Enjoy:
  • Twitter
  • Facebook
  • Digg
  • Reddit
  • HackerNews
  • del.icio.us
  • Google Bookmarks
  • Slashdot
This entry was posted in iPhone, Python. Bookmark the permalink.

Comments are closed.