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.

2 Likes

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 icloud.com, 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ā€.

:sweat_smile:

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!

2 Likes

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.

2 Likes

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