Fixing the Ability to edit iPhone Images Imported to Windows

If you’ve been plagued by the following errors ever since upgrading to iOS5:

This photo can't be saved because of a problem with the photo's file properties.
This photo can’t be saved because of a problem with the photo’s file properties.
Photo Gallery couldn't update this file: Error code: (0x80070057)
Photo Gallery couldn’t update this file: Error code: (0x80070057)

Fret no more, relief is here!

After much investigation the root cause is erroneous white-space characters in the XMP block of the image files. 

The first step to fixing this problem is to

Stop taking pictures with the volume button!

No, this is not a solution but the problem seems to happen more frequently for images taken with the volume up button than images take win the shutter release on-screen button. Therefor, avoiding the volume button seems like a good idea. Next,

Fix the Images which already have the issue!

Lots of work-arounds have been posted for when you discover the problem when editing a particular image, however; the issue may surface down the road on images you have not previously edited. For me, fixing the issue only on the images I attempted to edit was not a good solution. I wanted an all-or-nothing fix.

I’ve written a small Java utility which will scan over an entire directory (or a directory of directories, or a directory of directories of directories, etc) and fix the issue on any images which have it.  The full source code is available on Google Code (yes I still live in 2009, but at least it’s using mercurial). It will not touch images which do not have the issue.

Download jpegxmpxmltrimmer

As of this post the current version is 0.01 which essentially means:

It’s pre-production, pre-release, pre-beta, pre-alpha, pre-warranty, you-get-what-you-pay-for. /disclaimer

Run jpegxmpxmltrimmer

Assuming you already have a Java JRE installed, bring up a command prompt and enter the following command:

NOTE: This command will not edit existing files.  This is the safe mechanism to fixing your images.  Rather than fixing the originals, it makes copies and fixes the copies (named appropriately).

java -jar <path-to-downloaded-jpegxmpxmltrimmer.jar> <path-to-root-directory-of-images>

If you would like to fix the error by editing the existing files simply add a true at the end of the commandline.

That’s it.  You’ve now fixed the issue!  Yay! <insert-mini-celebration-here/>

The Catch

You’ve fixed the images with the pre-existing issue, but the bug still exists in the latest release of iOS (5.1 as of this post).

For now, you’ll have to run the utility over any files you import.  I’ve still found the issue on a few photos I’ve imported even since I stopped using the volume button.

I’ve reported the issue to Apple but haven’t yet heard back.  If you want this issue fixed permanently I suggest you do the same:

Creativity in a Touch-Screen World

The first time Delilah crawled it was to get my iPhone. No joke. Even before that she seemed interested so we would let her play with certain apps, taking video of herself, creating drawings, creating sounds etc.

A few days ago I was sitting at my computer doing something with our Taxes when Rachel brought her in for me to watch for a few minutes. As I set her on my lap she immediately reached for the keyboard. Not to ever stifle creativity, I tossed up Notepad and let her at it. She struggled for a few minutes and tapped a few keys and eventually ended up with this:

1 ` 1Q IYXZJG  nm hnmws SDEWQIOJHI9

Not spectacular by any stretch of the imagination.  But what got me was that a few years ago this would have been her limit.  Keyboard and mouse interactivity is something that takes a while to develop and at 6-9months she just wouldn’t have the skills to do manipulate our archaic input devices.

Not so, any more.  The following works were all created by Delilah on my iPad in the Kid Paint app:

Artistic masterpieces? No.

Impressive for a 6-9mo old? Hell yes
(Note: some help from me to pick colors and utensils and to restart the app when she accidentally closed it, but that’s it.)

Additionally, she’s composed some music using Beatwave: Beatwave Music Composition

If you don’t have it,
Get Beatwave on iTunes (FREE!)

Would any of this have been possible 5 years ago? Maybe, if you had a million dollars worth of touch screen equipment. She did this with a $500 1.5lb device. I think the age of the Dynabook has arrived.

Man the future is gonna be crazy. I can’t wait till she’s teaching me this stuff.