Long-term image storage - Compressed DNG vs HEIC, etc

Started 2 months ago | Discussions thread
ForumParentFirstPrevious
Flat view
M43Hero Regular Member • Posts: 159
Long-term image storage - Compressed DNG vs HEIC, etc

Been doing some research into long-term image storage formats. Looking specifically at compressed DNG (uncompressed is just as large as RAW) and HEIC as possible options. I'm ok with losing some image quality compared to RAW (12+ bit), but would prefer something a bit better than JPEG (8-bit), to be able to do some post-processing if necessary.

I did several experiments, including converting an original RAW file to HEIC with my Mac's built-in coverter, also with Imagemagick, and using Adobe's DNG converter.

Here are my findings (storage formats first):

  • RAW (Original Sony Compressed ARW)
    • Format: ARW (Sony Alpha Raw Image Format)
    • Filesize: 41.0312MiB
    • Reported Depth: 16-bit
    • max value in Red channel: 65535 <--- 2^16
    • So the file is actually 12 bit
    • exif data is present
    • Looks best
  • RAW to HEIC (with Imagemagick) :
    • Format: AVIF (AV1 Image File Format)
    • Filesize: 1.08155MiB
    • Reported Depth: 12/16-bit
    • max value in Red channel: 4094 <--- 2^12
    • So the file is actually 12 bit
    • exif metadata was not preserved during conversion
    • Looks worse than the Apple converted HEIC
  • RAW to HEIC (with Apple converter):
    • Format: AVIF (AV1 Image File Format)
    • Filesize: 961,427B
    • Reported Depth: 8-bit
    • max value in Red channel: 208 <--- 2^8
    • So the file is actually 8 bit
    • exif metadata was preserved
    • Looks better than the Imagemagick converted HEIC
  • RAW to DNG (compressed with Adobe):
    • Format: DNG (Digital Negative)
    • Filesize: 9.70217MiB
    • Reported Depth: 16-bit
    • max value in red channel: 65535 <--- 2^16
    • So the file is actually 16 bit
    • exif data was preserved
    • Looks about the same as Apple HEIC?

Since neither HEIC nor DNG are useful as final formats, I also ran a test to convert those files to JPEG using the same process/settings and compare the output:

8-bit JPEGS (all 3 post-processed files have the same "treatment", which consisted of 10% sharpening in Luminar 4):

  • Out of camera JPEG
    • Filesize: 6.46875MiB
    • max value in red channel: 228
    • Looks ok, a bit noisy and bad colors (its an old Sony A7RII)
  • Compressed DNG to JPEG:
    • Filesize: 30.5253MiB
    • max value in red channel: 188
      • not sure what to make of this, seems low
        • exposure is lower than others
    • Looks a bit better than OOC JPEG?? less noise better colors
      • Mostly due to better RAW conversion
  • ImageMagick HEIC to JPEG
    • Filesize: 27.07MiB
    • max value in red channel: 255
      • maxed out!
    • Seems worse than DNG->JPEG, more jaggies and noise
  • Apple HEIC to JPEG
    • Filesize: 18.6093MiB
    • max value in red channel: 237
      • ???
    • Seems similar to ImageMagick JPEG

Conclusion:

It appears compressed DNG is the sweet spot, since it compresses well (~9MB) and looks a bit better than the OOC JPEG. The fact that the JPEG is darker than the others indicates there is more information available (16 bit)

ImageMagick HEIC: Surprisingly, the file size is similar to Apple Heic even though it should have more data (8bit vs 12 bit). This seems to have more potential, and the output appears to be 12-bit, so in theory it should be "better" than JPEG or Apple HEIC, but for some reason it doesn't look much different. It looks brighter than the rest of the JPEG files (255 max value in red), so something is off during bit-depth/tone-mapping. I think the conversion algorithm might need some tuning (haven't found any docs on how to mess with HEIC conversion parameters).

Below is a screentshot showing all 8 files:

From top-leftt to bottom-left:

  1. Original RAW
  2. Adobe DNG (compressed)
  3. OOC JPEG
  4. ImageMagick HEIC -> JPEG
  5. Apple HEIC -> JPEG
  6. DNG -> JPEG
  7. Apple HEIC
  8. ImageMagick HEIC

I think ImageMagick or some other HEIC converter with some tweaks could be the best solution, but I haven't found anything else worth testing. More testing is necessary (with more/better test images). Anyone up for a challenge?

ForumParentFirstPrevious
Flat view
Post (hide subjects) Posted by
ForumParentFirstPrevious
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark MMy threads
Color scheme? Blue / Yellow