# Metadata For resolution of DNG files

**URL:** <https://resource.dopus.com/t/metadata-for-resolution-of-dng-files/33804>\
**Category:** Help & Support\
**Created:** [October 23, 2019, 3:47pm UTC](https://resource.dopus.com/t/metadata-for-resolution-of-dng-files/33804 "2019-10-23T15:47:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![auden](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@auden](https://resource.dopus.com/u/auden)\
**Post date:** [October 23, 2019, 3:47pm UTC](https://resource.dopus.com/t/metadata-for-resolution-of-dng-files/33804/1 "2019-10-23T15:47:52Z")

</div>

Anyone have any ideas on getting the resolution of DNG (Adobe Digital Negative Format) files?

Picresx works fine for JPG TIFF etc, but does not seem to work for DNG. Photoshop just tags it as Resolution.

Any help much appreciated.

---

<div class="post-metadata">

**Author:** ![lxp](https://resource.dopus.com/user_avatar/resource.dopus.com/lxp/32/33734_2.png) [@lxp](https://resource.dopus.com/u/lxp)\
**Post date:** [October 23, 2019, 7:27pm UTC](https://resource.dopus.com/t/metadata-for-resolution-of-dng-files/33804/2 "2019-10-23T19:27:39Z")

</div>

Photo viewers [XnViewMP](https://www.xnview.com/en) and [PicMeta](https://www.picmeta.com) will provide this info. For use within Opus I'd pick [ExifTool](https://sno.phy.queensu.ca/~phil/exiftool).

---

<div class="post-metadata">

**Author:** ![auden](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@auden](https://resource.dopus.com/u/auden)\
**Post date:** [October 24, 2019, 5:05am UTC](https://resource.dopus.com/t/metadata-for-resolution-of-dng-files/33804/3 "2019-10-24T05:05:00Z")

</div>

Thanks for the tip. Exif Tool unsurprisingly reports the metadata field is X Resolution, just s JPEG, TIFF etc. so the next question is why:

> Set imageData = selItem.Metadata.image  
> Set otherData = selitem.Metadata.other  
> dippy = imagedata.picresx

yields a zero value with DNG format files in Opus and the correct value in JPEG TIFF etc?

---

<div class="post-metadata">

**Author:** ![lxp](https://resource.dopus.com/user_avatar/resource.dopus.com/lxp/32/33734_2.png) [@lxp](https://resource.dopus.com/u/lxp)\
**Post date:** [October 24, 2019, 5:19am UTC](https://resource.dopus.com/t/metadata-for-resolution-of-dng-files/33804/4 "2019-10-24T05:19:47Z")

</div>

Raw picture formats are simply not as well supported as jpg, tiff etc.

Extended EXIF might help or at least give you some ideas how to use Exiftool in your script.

> [@Columns: Extended EXIF (Picasa faces e.g.)](https://resource.dopus.com/t/columns-extended-exif-picasa-faces-e-g/18885):
>
> ExtendedExif - Script columns for extended and custom exif information. If you do not edit the script, it will add the following columns. ExifTool-Columns: Lens ID (the lens used on your camera, the script adds lens-ids for some panasonic lumix mo…

---

<div class="post-metadata">

**Author:** ![auden](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@auden](https://resource.dopus.com/u/auden)\
**Post date:** [October 24, 2019, 7:02am UTC](https://resource.dopus.com/t/metadata-for-resolution-of-dng-files/33804/5 "2019-10-24T07:02:09Z")

</div>

Many thanks for your suggestion. But I have hit on a different and simpler solution. As the DNG files I have are all imported from Lightroom, I do, in fact know their dpi.

But because my script was being confronted by a 0 length field, the script was erroring. A simple If loop to apply to DNG files has sorted it out.

Problem solved, thanks for your help with another example of the mess that is image metadata

---

<div class="post-metadata">

**Author:** ![Jon](https://resource.dopus.com/user_avatar/resource.dopus.com/jon/32/12713_2.png) [@Jon](https://resource.dopus.com/u/Jon)\
**Post date:** [October 24, 2019, 7:36am UTC](https://resource.dopus.com/t/metadata-for-resolution-of-dng-files/33804/6 "2019-10-24T07:36:09Z")

</div>

If you add the resolution columns to the file display do they show anything for those files? I have some sample DNG files here which show X and Y resolution fine so I would have expected a script to be able to read them as well.

---

<div class="post-metadata">

**Author:** ![auden](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@auden](https://resource.dopus.com/u/auden)\
**Post date:** [October 24, 2019, 10:34am UTC](https://resource.dopus.com/t/metadata-for-resolution-of-dng-files/33804/7 "2019-10-24T10:34:31Z")

</div>

The x and resolutions only show up for for JPEG images. They are blank for DNG files.

The DNG files I am using are all imported from my Nikon D600 into Lightroom and then exported out.

I have seen a couple of reports that the problem may be caused by using Lightroom Metadata presets. I use one of these presets, but deleting this does not help.

[Dalesman (5 of 25).zip](https://resource.dopus.com/uploads/short-url/qCjsztTMYrsbCDfJOIhgRP1Wf73.zip) (30.0 MB)

I attach one of my DNG files with the problem

---

<div class="post-metadata">

**Author:** ![Jon](https://resource.dopus.com/user_avatar/resource.dopus.com/jon/32/12713_2.png) [@Jon](https://resource.dopus.com/u/Jon)\
**Post date:** [October 24, 2019, 10:42am UTC](https://resource.dopus.com/t/metadata-for-resolution-of-dng-files/33804/8 "2019-10-24T10:42:37Z")

</div>

Thanks, I'll have a look. The samples I was looking at came from [https://www.kenrockwell.com/leica/m9/sample-photos-3.htm](https://www.kenrockwell.com/leica/m9/sample-photos-3.htm) if you want to compare them.

---

<div class="post-metadata">

**Author:** ![auden](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@auden](https://resource.dopus.com/u/auden)\
**Post date:** [October 24, 2019, 10:50am UTC](https://resource.dopus.com/t/metadata-for-resolution-of-dng-files/33804/9 "2019-10-24T10:50:13Z")

</div>

The images from the kenrockwell site have x and y resolution set and my macro code picks them up OK.
