Trying to figure out iPhone photo formats with darktable

Some other forum posts led me to experiment with non-JPEG photo formats on my iPhone 13 Pro Max. I mainly started from this thread: Moving raw files from my Android phone an SSD

HEICs are about 2 mb file size. If I try to send them from my iPhone to my PC, something automatically converts them to jpg, anyway. I searched and found that if I save it to the Files app on the phone as a compressed (zip) file, I can then get it to my PC, uncompress it, and have the HEIC file to work with in darktable. So, it’s a pain in the ass, but I have it figured out.

So, now to “raw”. The phone saves raw files as DNGs. A similar scene to my HEIC test takes about 30 MB. I can get it to my PC via Google Drive, but it is too large for Gmail. I can import the file to darktable and see the photo in the Lighttable thumbnails. But when I try to open it in darkroom, it says it cannot be opened: Please check that it is from a supported camera (to paraphrase the error dialog). Can iPhone raw DNGs be used in darktable?

Currently, not without patching rawspeed (or, perhaps using the “rename to .CR3” hack in the meantime; however, this hacky way will require redoing all the database references once the regular way starts working, so use at your own risk…).

Finally, you can of course also put them through Adobe DNG Converter and they will work as well.


Thanks. for your response. I don’t usually use Adobe products, and I doubt that the DNG converter is available for Linux, anyway. I imagine pixls already has file samples, but I’ll try to check.

Haven’t tried, but I believe DNG Converter works with Wine.

1 Like

Thanks. I think so, too, but I don’t use Wine, too.

So, I played around in darktable with a pretty good HEIC photo I took in Acadia National Park in August. It was difficult to improve on the original, and when I came to something I liked, I did a snapshot and compared them, directly. I some ways, the original was better than my edit. I’m sure this means I could do a better set of changes with darktable.

After my darktable edits:

IMG_1144_01.heic.xmp (4.6 KB)

Original from iPhone:

IMG_1144.heic.xmp (4.6 KB)

1 Like

Nice view. I’m surprised at how low resolution the images are though… considering it’s a new (?) phone. Is it set to save full res images? Unless the one’s you posted are cropped?

1 Like

No, I took the picture myself. Wait, I’ll check and see what I can find out…

The EXIF data says it’s 4032 by 3024. IDK, maybe the conversion to jpg to post them here screwed something up. They don’t look bad to me, though. ???

Even later: It looks like I have confused myself, too. Looking at both images in darktable, it appears that I edited both. I had thought that one of them was just imported, then exported to jpg, but both say that darktable modules have been applied. Maybe I just need to delete that post and start over.

This is the original sent directly from the phone, never touched by darktable. It was converted from heic to jpg either by the phone or by gmail; I don’t understand yet where that happens.

PS - You are right, it does look pretty ill-defined.

1 Like

I believe the phone does the conversion when you share it.

1 Like

As @paperdigits says, it’s almost certainly the Photos app that converts it when sharing by email. This has always been the case, I believe, whether JPEG or HEIC.

If you sync your photos with iCloud the easiest may be to download them via, but you could also use the “Copy iCloud Link” feature.

1 Like

Thanks. That is a great idea about iCloud. They are usually already sync’ed, there.

@123sg , thanks very much for pointing out that my photo does not look so good. This seems to be a common problem. I did a web search and came up with many “hits”. I used this article to change two settings which should help in the future:

Unfortunately, I took hundreds of photos on a once-in-a-lifetime vacation in August, and every one of them had the “bad” settings.

It wasn’t so much that it didn’t look ‘good’. more just that wasn’t as much detail as I expected for a modern camera.

Ouch - sorry to hear that. Reminds me of a similar error I made some years back… :flushed: It’s easy to say I guess, but personally, I wouldn’t worry about it too much. You still have the photos, and there’s no doubt that they are more than good enough for most applications.

Just think how bad it would be if you’d dropped it in that lake! No images at all… :worried:

1 Like

Well. it wasn’t exactly an error. Those were the default settings, and I assumed they should be best.

I know, “assume makes an ass of u and me”.


Mine was. I had a new compact camera, bought for the trip, many years back. l set it to 5MP (it was a 12MP camera) to save space on the card. Not the best idea, but to make things worse, that camera had a bright screen. I didn’t realise I was seeing the screen brightness, and took all my photos with the exposure compensation set to -1 or -2. :anguished: Weeks later, I got them on the computer, and they were all really dark, and while I could brighten them, the a lot of detail was lost in those underexposed, downsizesd jpgs. Looking back, I was a bit clueless sometimes back then!


Ok, I took a few test shots today after changing those settings. I think they look better, but my eyes aren’t very good.

This shot was imported to darktable as an heic, then exported as a jpg with no edits done.


That looks good to me! Nice and detailed. What was the main setting difference I wonder? I have a phone with a camera but… it has 5mp, no autofocus (or anyfocus) and a scratched lens! So I’m not really familiar with modern camera phones…

1 Like

The change was to unset Lens Correction. Seems counterintuitive, doesn’t it?

1 Like

Gosh… seems more like a bug to me! But I guess there’s some Apple logic in there somewhere… :wink:
But as long it works that’s the main thing!

1 Like