Problem with orientation of DNG files

Started by banzai, September 02, 2018, 01:35:31 PM

Previous topic - Next topic

banzai

Hi,

I experience a strange behavior with DNG files created from my original NEF files.
The NEF is declared as master and the DNG is a version. The DNG is created with the current version
of the Adobe DNG Converter.
But for all images which have been shot in protrait mode, the DNG is displayed in landscape (thumbnail, in viewer, etc.), while the NEF
is correctly displayed in portrait mode.

When I look at the metadata, both files have {File.MD.Exif::Main\274\Orientation\0} set to "Rotate 270 CW". And "Image Width" is in both cases the bigger number
compared with height.

When displaying the DNG file in Windows Explorer or in XnView, the DNG is correctly orientated. That leads me to the conclusion
that the file itself is not the problem.

Are there any other metadata tags which IMatch might use to determine orientation?

banzai

Mario

IMatch processes DNG files via the installed WIC codec and applies the orientation as per EXIF. Note that Windows Explorer may ignore rotation.
Show us a sample DNG file which exhibits this behavior. I need to have it here to see what the problem is or why Windows WIC may rotate it wrong.
Have you applied a crop or rotation in ACR? Maybe the DNG was written in the neutral orientation but the EXIF data was not updated?

Please upload a DNG somewhere and post a link. Or send it to support email address.
Select a DNG in a file window and go to Help > Support > WIC Diagnostics. Post the results so we know which WIC codecs you have installed for DNG.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

banzai

Ok, your hint with the WIC Diagnostics Report helped me solve the problem.

After installing "Adobe DNG Codec", the problem is gone. Although I really had a hard time finding this download, had to use webarchive.org to get it. I wonder why Adobe seems to no longer provide a current download for this.

This is now the output (well, first part of it) of the WIC Report:
QuoteWIC Codec Report - for diagnostic purposes.

List of installed WIC codecs:
   Codec 'BMP Decoder' for extensions .bmp,.dib,.rle
   Codec 'GIF Decoder' for extensions .gif
   Codec 'ICO Decoder' for extensions .ico,.icon
   Codec 'JPEG Decoder' for extensions .jpeg,.jpe,.jpg,.jfif,.exif
   Codec 'PNG Decoder' for extensions .png
   Codec 'TIFF Decoder' for extensions .tiff,.tif
   Codec 'DNG Decoder' for extensions .dng
   Codec 'WMPhoto Decoder' for extensions .wdp,.jxr
   Codec 'DDS Decoder' for extensions .dds
   Codec 'Microsoft HEIF Decoder' for extensions .heic,.heif,.heics,.avcs,.heifs
   Codec 'Microsoft Camera Raw Decoder' for extensions .ARW,.CR2,.CRW,.ERF,.KDC,.MRW,.NEF,.NRW,.ORF,.PEF,.RAF,.RAW,.RW2,.RWL,.SR2,.SRW,.DNG
   Codec 'Adobe Digital Negative Format File Decoder' for extensions .dng


WIC: Testing file 'H:\Bilder\bk\pics\incoming\2017-06-10\Pic_2017-05-15_18-07-19.dng'
   Thumbnail: Codec 'Adobe Digital Negative Format File Decoder'
      () 170x256 pixel in 421 ms.
   Preview: Codec 'Adobe Digital Negative Format File Decoder'
      () 170x256 pixel in 484 ms.
   Full resolution: Codec 'Adobe Digital Negative Format File Decoder'
      () 3264x4928 pixel in 422 ms.

WIC Result: A codec for this file format is installed and it looks like it fully supports the format.

There are now three codecs feeling responsible for .DNG
Codec 'Adobe Digital Negative Format File Decoder' is the new one, it was not there before when it did not work.
IMatch was using Codec 'DNG Decoder' (the report before the codec installation told), which apparently does not work correctly.
And I guess Windows used Codec 'Microsoft Camera Raw Decoder'? Don't know how else to explain that Windows Explorer worked before.

Well, all is fine now, thanks for your help :)

banzai

Mario

As far as I know Adobe no longer provides a DNG codec (and most camera vendors neither).
The standard codecs included in Windows usually work quite well. Unless Adobe did something to your files only the Adobe codec understands...?

Please provide a sample DNG for download or send one to me (support email address).

When multiple codecs are installed for the same format, the behavior is undefined. Windows picks one...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

aki-bs

I have the same problem with DNG images from Pentax and Samsung.

With Windows explorer it works fine.
With IMatch the orientation is always landscape.

In Windows 7 I had installed an Adobe codec and the problem has been solved.
But I couldn't find an Adobe codec for Windows 10.

What is now the official IMatch solution for this problem?


Mario

#5
Adobe does not longer provide DNG codecs. Cost cutting and Microsoft Windows 8 and later include a WIC codec for DNG.

IMatch uses the DNG files as delivered by the WIC codec installed on your system. It then checks the embedded EXIF orientation information in the file and rotates the image accordingly.
If this does not work, either the WIC codec fails to handle your files, or the orientation info in the EXIF is wrong. Hard to tell without knowing:

- which WIC codec you use, see WIC Diagnostics
- a sample file which exhibits the problem

If the WIC codec is the problem and it fails to handle your files properly., you need an updated WIC codec.
If the EXIF orientation in the file does not match the physical orientation of the pixels, you can override this with a virtual rotation in IMatch.
I can tell you more when I have seen a sample file.

Unless this is caused by a bug in IMatch, there can be no "IMatch solution" for this problem. Except the already existing virtual rotation option to fix exactly this kind of problem.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

lbo

FWIW: The codec pack from fastpictureviewer.com (10USD) does a good job for me.

Oliver

Mario

#7
Thanks for sending the images. I have tried them with FastPictureViewer codes and they show up with the correct orientation.

Then I tried them on a clean W10 system with only the Microsoft DNG codec installed (the same setup as your system as pper WIC diagnosis) and the orientation is wrong.
It seems that the Microsoft DNG codec does not handle your specific DNG variant correctly.

The image with the tower has EXIF orientation 270" clockwise set, the green artwork image requests to be rotated 90° clockwise.
When I look at the result in IMatch, the image is rotated by 90" clockwise, but it should not. So either the EXIF orientation is wrong or the image data returned by the WIC does not match the orientation.

When I switch IMatch to use the built-in RAW processing (Edit > Preferences > Application) and force a rescan of the files, it get a much less over-saturated look and the orientation is correct.

So: The FastPictureViewer WIC codecs and LibRaw handle your files correctly. IMatch too.
It's the Microsoft DNG coded shipped with Windows which does not handle your file. I recommend you either use one of the alternatives mentioned here or you send your files to Microsoft support for analysis and comment. Let me know what they find out.

In the mean time, you can apply a virtual rotation in IMatch to set your files straight. See Virtual Transforms
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

aki-bs

Thanks for your analysis.

But I still can't understand, why the DNG-images are shown rotated correct in Windows Explorer on my Windows 10 desktop.
If the codec works not correct, I also should have problems with Windows Explorer or I'm wrong?

o

Mario

This question only MS can answer. Maybe Windows Explorer ignores EXIF orientation or something. Or it does not use the WIC codecs. Or it usues the WIC codec in a non-standard way. For me it is only important that this is non an IMatch problem.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook