Android RAW API Explained


Ever since the Android team confirmed it was working on an API to give Android users access to RAW files from the camera, there seems to have been some confusion to what this means: One camp asks “I have a DSLR…why would I want to edit RAWs from a phone?” And the other, “I don’t want to do all the extra editing work that comes with RAW files! I just want to post pictures SOOC!” Both of these questions are somewhat misguided, so I wanted to help clarify how the new RAW API will (probably) fit into the Android user experience.

The main confusion seems to lay in an assumption Android phones will now be dumping RAW files into our galleries. This may or may not happen–I’m no Googler, so I couldn’t say for sure–but by reading tech press, I don’t think it’s Google’s main intent. I think Google is trying to improve Android cameras by reducing the impact of mediocre OEM software.

What does mediocre OEM software have to do with any of it?

Under the current system, third party camera apps have no access to raw data from the sensor. If a developer’s app tries to ask for raw data, the hardware returns a “null” result. The way current camera apps work is by (at most) feeding in settings and requesting a JPEG back from the hardware. In theory, that means two phones with the same sensor and different OEM-built firmware could return different quality photos (as demonstrated in spectacular fashion by the Motorola X), even if their capabilities are the same. Right now, if you have a great sensor in your phone, but have mediocre OEM firmware, all your photo apps are stuck using mediocre JPEGs as a starting point!

This is especially challenging because JPEGs only have 16.78 million colors per pixel. It’s plenty for the human eye–which can detect between 10-12 million–but not much for editing. You won’t be able to stray far from the JPEG your OEM saddles you with.

But doesn’t shooting in RAW mean I have to edit manually?

If you’re shooting any digital camera, you are literally always shooting in RAW. Point-and-shoots have onboard software to translate the raw data into JPEGs through a variety of image presets (do portrait, landscape, and vibrant ring a bell?), making RAW processing so quick and painless, most users don’t realize it happens, hence the perception that shooting RAW requires manual editing.

Advanced point-and-shoots and DSLRs give you the option to edit RAWs manually, to have access to the 68.68 billion colors in a typical 12-bit raw file and play with them until you’re ready to discard the data you can’t perceive and set it into a JPEG you won’t have to alter further. Editing RAW files with third-party software is like adding additional JPEG output settings.

Okay, so what does that have to do with Android?

In creating a RAW API, the Android team is liberating app makers (and avid Android photographers, like myself) from mediocre OEM camera algorithms spitting out sub-par JPEGs. With the new API, developers will be able to create camera apps which use their own algorithms to interpret data from sensors. This opens the door to nicer pictures with the same point-and-shoot ease, and a whole new industry for developers.

Developers will also be able to devise other cool tricks, like creating virtual “ultrapixels” by downsampling the RAW file and combining the merged pixels’ data into a more accurate, sharper, brighter photo. Something like this is already being used in the legendary Nokia 1020 camera.

Or, for the more industrious amongst us, Snapseed can already edit TIFF files. We could take advantage of those billions of colors already, if we could only get at them! I imagine apps like VSCO and Instagram, which are already used by millions, could make good use of the data without imposing any additional work on those using them.

Basically, by introducing the RAW API to Android, Google is making good on Vic Gundotra’s promise that Android is going to take mobile photography seriously, and most of us probably won’t notice anything other than our photos getting better. Yes, it seems the era of truly excellent Android photography is upon us.