1

I have written a program that has a feature for viewing images. It works fine for common files types, I simply use a picturebox. But I want to be able to load DNG (Digital Negative) images too.

I don't need to load the whole thing, loading just the baked in jpg preview would be fine, even if not all DNGs have it, I am willing to settle for this to avoid a huge hassle. Plus since DNGs are so big and my program is meant to browse through them quickly this might be best anyway.

I have tried using WindowsAPICodePack.Shell to get the Extra Large Bitmap or Icon from the file. I am already using this for my "explorer" thumbnails. But there is nothing larger than "Large" which I believe is around 256px. I know that the image has something around 1024px jpg preview.

Is there an easy way to get at the jpg preview of a DNG file?

Stoopkid
  • 1,885
  • 2
  • 17
  • 30
  • hi, for all image related stuff i use ImageMagick, that also support DNG. They have variants for java, .NET,... I think i have read you can extract the thumbnail from the file. – user2660616 Dec 22 '14 at 13:00
  • To image readers that aren't aware of DNG files, they look like TIFF files with a single JPEG (thumbnail) as the only image. If your image reading code can handle TIFF w/JPEG, it can read the full sized thumbnail from a DNG. – BitBank May 29 '15 at 05:30
  • @BitBank yeah, I am actually trying to get at least the embedded preview. The thumb is too small. Unfortunately it seems to be just as much work to get tiff working as dng in c#. – Stoopkid Jul 19 '15 at 02:42

0 Answers0