I have an image viewer written in C#, WPF, .NET v4. It reads the orientation EXIF tag and rotates accordingly the displayed image. It works great for JPGs. When loading RAW formats supported by the camera codec pack (NEF and CR2, in my case) the rotation is correct only for 0 and 180 degrees, for 90 and 270 the image is rotated by 180 degree (ie. upside-down, not portrait).
The code for rotation is (imgOrientation below is correct):
img.LayoutTransform = new RotateTransform(imgOrientation);
Windows Photo Viewer shows OK.
Is somebody aware of this problem, any solution?
Thanks.