Photoshop Touch

Photoshop touch has a lot of cool features and decent responsiveness, or, at least it would if not for two very suspicious limitations: Requires iPad 2 and a maximum output size of 1600×1600.

Umm… in 2002 Photoshop 7 on my 500 MHz G3 iMac with 256MB of RAM and a 1024×768 resolution did NOT have a maximum image size of 1600×1600 nor did it require a dual core 1GHz processor or 512MB of RAM. Let’s go over what might have gone wrong.

Let’s start with the fact that it’s an AIR app. That means it’s written with Adobe’s APIs rather than Apple’s. While this makes cross platform porting possible (for all 17 people that have a capable Android Tablet) it has a lot of very negative side effects.

First, since you’re not talking directly to the compiler, you can’t use pointers. Your indirect AIR objects probably use a lot of pointers but you can’t directly. When you lose this manual memory control overhead starts to add up quickly. How quickly? Well, in Auto Adjust, Normalize, and iDecorate, a 12MP image takes up 12MB x 4 colors (alpha is supported) = 48MB of RAM. A 1600×1600 image takes up 7.68MB of RAM in RGB, 10MB if alpha (transparency) data is included. That sounds small right? Why would Adobe have to make such a tradeoff?

On first and second generation iOS devices, you only have 128MB of RAM, which the system takes a lot of. You have about 40MB for you app to work with before you just segfault and crash. So 10MB for 1600×1600 plus 20MB for overhead is the artificial limit I set for Auto Adjust when running on these devices. “That’s trivializing it. Your apps just hold a single image in RAM. Photoshop Touch has layers and shit”.

That iMac of mine was also used to edit gigapixel images. WTF is a gigapixel? Back in the day, the preferred method for rotoscoping (frame by frame editing) was to export a “filmstrip” from Premiere. This would be a single image file with each individual 720×480 frame on it. This added up quickly and saving changes involved a minute (or longer) progress bar. How could this be possible? The machine didn’t have 3GB of RAM to store the image.

Back in the day, developers used to do this thing called “paging”. We knew we couldn’t be RAM hogs so we’d write routines that would look at say 8MB of a file at a time. If we needed to look at 8 more MB but the previous 8 weren’t saved yet, we’d write that to a temp file on the disk. For the Pro Video veterans, this is what the scratch disk is. A tragic irony of Adobe not using scratch space (or not well it would seem) is that the iPad’s solid state storage is faster than hard drives were back then, so wait times wouldn’t even be so bad.

Why didn’t Adobe use this technique in Photoshop Touch? Well, first let me go over why I didn’t bother. My apps can process any image the device’s camera is capable of taking. The iPhone 3G took 1600×1200 pictures so there wasn’t much need to finagle support for the edge-case scenario of something using larger images. It was almost impossible to even load them onto the device. To this day, to get a very large image onto an iOS device you have to use Mail or Mobile Safari. Synching with iTunes will down sample to some degree.

But Photoshop Touch DOES receive very large images. It’s really inexcusable to not support them, especially not supporting them in a $9.99 app. So to recap, the reason they aren’t is because of a RAM limitation, for which a solution has existed for 20 years, which they chose not to implement, possibly because writing an AIR app (rather than a real app) would make that impossible. I bet if iPad 3 continues to have 512MB of RAM Adobe won’t raise this limit and will have an app that can’t produce images as big as the display.