iPhone 2.0.0 Artwork Tool

About

You may have noticed that much useful iPhone artwork is packaged in files ending with the .artwork extension. This software helps you export images from those files so you can build useful things with them. Once you've tweaked the exported images, you can import them back into a new .artwork file.

The software is written in python. You must have python and the Python Imaging Library installed in order for it to work. If you're using OSX, I suggest using MacPorts to install the PIL. On Windows, it is easiest to just install Python and the PIL directly from the installer executables.

Because each artwork file is different, I only support three at the moment:

To get set up, right-click and download the python source code. Be sure to save the file with a .py extension.

Next, find the appropriate artwork files on disk.

A Note About iPhone 2.1 Software

iPhone's 2.1 software was released three days ago. I am about to go on vacation, but when I get back I'll update this tool to support 2.1. So hang tight, and check back in a few weeks!

Cheers,
Dave

(09-15-2008)

Exporting

To get the images out of a .artwork file, you export them. This fills a directory of your choosing with easily editable PNG files.

To export, run the tool as follows:

python ./iphone20-artwork.py -export Keyboard-Latin.artwork ./img

That's all there is to it!

Importing

It is equally easy to turn a directory full of PNGs into a new .artwork file.

To import, run the tool as follows:

python ./iphone20-artwork.py -import Keyboard-Latin.artwork ./img Final.artwork

This will read all the PNGs in the img directory and place them in the file named Final.artwork. Again, easy!

You may wonder why you have to supply the original Keyboard-Latin.artwork file in this example. The reason is that in iPhone2.0 OS, the artwork files sometimes contain extra data that is not image data. And of course it is important to keep this data around. So we only use the original .artwork file for reading in this example -- of course, we never write to it!

Version History

v0.6 (current) 7/28/2008 - support other image formats besides RGBA. Fix a filename-related bug (used relative name instead of absolute.)

v0.5 7/25/2008 - add support for MobilePhone images, and clean up usage messages.

v0.4 7/24/2008 - add feature support for -import so that you can make artwork files

v0.3 7/19/2008 - use os.path to manipulate paths so that things work nicely on windows

v0.2 7/18/2008 - change command line structure to use -export (preparing to also add -import) and fix bugs in usage_* methods

v0.1 7/13/2008 - released initial version, with export support for all 2.0.0 UIKit artwork

Contact Me:

Feel free to send comments, suggestions, and improvements my way (see code for details on making improvements.)

You can reach me at code [at] davepeck [dot] org.