The Best Raw File Convertor on Android: Meet Its Developer

The Best Raw File Convertor on Android: Meet Its Developer

You've just copied your camera's full resolution, high dynamic range raw files onto your new Android phone. How on earth do you start processing them? An app called raw2dng is the Play Store's most popular solution. Meet its developer.

That new Nikon D850 has just arrived and after your first shoot in anger, you need to get some promo shots straight up on to Instagram. You've connected it via a Wi-Fi hotspot to your Huawei Mate 20 Pro and copied the NEF raw files across. You're intending to process them in Snapseed at full resolution, adjust the white balance, and pull back some of that shadow detail before exporting at a lower resolution. But how do you convert your files to the DNG format that Snapseed understands?

Fima Gena has the answer in the form of raw2dng, Android's premiere open source raw converter with over 100,000 downloads since it was released in 2015. If you've stumbled in to the problem of how to view your raw files (and haven't read my earlier article) then you might have come across it already. I caught up with Fima and asked him why he started developing raw2dng. Like me, he had wanted to edit his files in Lightroom and had hit the same problem of DNG-only support. "I started looking for DNG-conversion tools and quickly realized that the offering in the Android and Linux world was quite limited," said Fima. "So, with a very naive 'how hard can it be' attitude, I decided to start writing one myself."

That sounds like a familiar refrain and I imagine that halfway through he took a deep breath and sighed, then thought he'd better get on to finish what he had started.

Like most programming projects, it is comprised of different components: the open-source back-end, custom written front-end, and a number of third-party libraries. The front-end is written in over 6,000 lines Java, while the back-end converter has around 5,000 lines of dense, sparsely documented C++. It's the libraries that are the real killer in terms of bloat, with Adobe's DNG-SDK coming in at over 100,000 lines. Other libraries include libraw, exiv2, and libjpeg.

For photographers who are cognitively invested in copyright and intellectual property, it seems odd to release your creation as open source, so I posed the question to Fima.

The converter back-end and Wi-Fi-connection library are [open source]. I opened the code partly due to license requirements, partly in the hope that others would contribute support for more cameras  — [it] hasn't really materialized unfortunately — but mostly because there was really no reason not to.

It pays to remember that open source is an ecosystem, a community. Fima is a firm believer in the innovation that open source fosters and, for raw2dng, libraw is a crucial part of that. That's an important point to remind ourselves of and leads to the more general observation that openness breeds interoperability because it allows you to mash up software and hardware. Fima is therefore justifiably proud of the Wi-Fi import routine he has developed, writing the PTP/IP protocol-stack from scratch and then having to, in-part, reverse-engineer the camera communication.

Programming is about solving problems and this meant writing a component from the ground up, as well as trying to figure out how the camera communicated over a network, a problem because it's not an open system. Wi-Fi import is perhaps an obvious stand-out feature. Fima also highlights the SD card support. As he said, "[It] sounds trivial but Android's support of SD cards is fragmented, inconsistent, buggy, poorly documented, and generally a pain to implement properly." It's a sign of a well-written app when something is integrated so seamlessly you don't notice it. Anyone who has installed apps that make use of the SD card will probably understand how variable support can be.

When you look at the comments left by users they are split into two distinct camps. I definitely fall into one that, after reading the instructions, find that not only does it do what you expect, but faultlessly and, indeed, with style. Then there are those who don't read the instructions and, well, complain. Some users comment that raw2dng is reducing the resolution or quality of their photos while converting, however he refutes that. He points out that a lot of raw viewers cannot actually render DNGs and instead only show low-resolution JPEGs.

Likewise, if you hit problems with connecting to your phone using Wi-Fi then read the instructions, as well as my earlier article. It's also a timely reminder that as a programmer you need to write faultless instructions as there will always be someone who makes the dumbest mistake. As a user, you need to read them.

Of course, for any techno-nerd it's not what is currently available that is exciting, but what is in the pipeline. Where is the bleeding edge and when will we see it? The two biggest headliners are CR3 support which will please shooters of newer Canon cameras and Android file sharing. This would use Wi-Fi Direct to allow the transfer of files between devices, further building on the solid Wi-Fi features already implemented.

Fima is an enthusiastic photographer and, like many, finds it the perfect combination with travel, particularly his passion for landscape photography. Given the Wi-Fi support in raw2dng, it's not surprising that he's a Sony shooter. In his own words, "I'm in love with my Sony a7R III." You can't fault the choice of camera for landscape work. In terms of influence, Trey Ratcliff has had an impact on his style which he thinks "is similar to his [but] maybe with less colors."

I asked Fima how he got in to photography and it sounds quite familiar. He believes he has creative elements, but finds it difficult to begin from scratch. Photography provides a starting point from which to refine. There is, of course, also the technology element marrying art and science which many enjoy. He photographs for himself and this links closely to travel to less crowded places. I asked him which were his favorites.

I've been to a number of off-the-beaten-track places which are great for photography. For example, I loved Lalibela (Ethiopia), Ilha de Moçambique, Bagan (before the beginning of mass tourism), Bhutan, the Karakum desert, and Salar de Uyuni to name just a few.

Back on Android, Fima is a big fan of Lightroom Mobile and its "cloud-first" strategy which allows you to seamlessly integrate a desktop-mobile workflow in to your photography. Of course, raw2dng plugs the gap in terms of getting raw files onto your smartphone in the first place. Talking of smartphones, I'm always interested to see what photographers think of using it for their photography. Fima admires the speed of development of smartphones like the Google Pixel 3, such that their outputs rival simpler DSLRs from recent years. As he said, "Clearly smartphone cameras are 'good enough' for 95 percent of people."

However this view is also tempered by a heavy dose of pragmatism as you can't get around the fundamental physics of sensor size and focal length and the limitations they bring. Future gazing raises the following thoughts: "Will AI-generated bokeh ever be as good as the real thing? Can multi-lens cameras close the gap in resolution and dynamic range? Who knows — I certainly wouldn't mind having the power of a professional DSLR in the format of a smartphone."

I finished off the interview by asking where his frustrations lie as a photographer-programmer. This is firmly leveled at the camera manufacturers.

Why do we still have so many proprietary, undocumented raw-formats? I really cannot see any reason why [manufacturers] wouldn't at least publicly publish their format-descriptions or, better, switch to DNG directly.

As I've commented on before, the future of camera development are hybrid systems which employ far more on-board processing and embedded Android offers one route to this future. Fima firmly believes that there is little commercial advantage to proprietary formats (and Leica believes so with its support of DNG) and "they are now inhibiting innovation in open-source photo editing for no good reason."

Fima is a great example of how, by combining your passions, you can develop as a person, learn new skills and competencies, and take what other people have produced to push existing boundaries. If all things in life were easy then we wouldn't grow as individuals from the challenge and, likewise, the world wouldn't gain from our growth. We should try to give back in equal measure to what we have gained.

With raw2dng now in a nice place I was interested to see what project was next on the radar. "Nothing significant, though I'm coding my own heating system for my house at the moment," said Fima. Might as well aim high!

Lead image courtesy of Tom Pumford via Unsplash, used under Creative Commons. Copy image courtesy of Fima Gena.

Mike Smith's picture

Mike Smith is a professional wedding and portrait photographer and writer based in London, UK.

Log in or register to post comments
8 Comments

Please forgive my ignorance, but I'm not sure why I'd want to put raws on my phone. Is there another FS story that explains that?

As an former programmer, I understand his frustration. Many yonks ago I tried to figure out the Amiga (remember them??) image formats. Called ILBM if I recall. I even remember the comment at the top of one of the libraries referring to 'recursive decent structures'. Got that? Didn't yur muva neva teech ya nuffin?

(PS the raw2dng link appears to be broken)

Thanks for that spot... copy editing did a find and replace which changed it!

What's with the film camera in main image?

Free stock photography NVM

https://unsplash.com/photos/ZRPaHOI9dc8

...because we need to be processing and color correcting our 40+ meg images on our phones and tablets because it's...you know...cool...

Werrd. I've been getting into shooting jpegs and transferring them to my phone with my fuji XT1. this camera gets colors right most of the time. If i need to make exposure adjustments or crop I just use the photoshop app. I love how simple that work flow is and it makes me want to shoot more :D But I would never put raw files on my phone D: That's just crazy talk.

Do you know any [free dvd ripper](https://thinkmobiles.com/blog/best-dvd-ripper-software/)? I can use to convert DVD files.