As part of my app, I wanted to include the ability to rotate images using the -exif:orientation
tag.
This can be applied either directly to an image file or to an XMP sidecar file.
If I use my app to write directly to a RAW file, PL5 will successfully read that tag from the RAW file.
If I use either my app or FastRawViewer to write to the XMP sidecar for a RAW file, PL5 will successfully read that tag from the XMP file.
For a test, I chose a RAW image, taken in portrait orientation on the camera, which normally contains the orientation as “Rotate 270 CW”.
If I open that image in PL5 and make a change to provoke the creation of a DOP file, I can then read the DOP file and get a Rotation of 3, but in the database, I get a Rotation of 1.
Now, in PL5, I rotate the image, to the right.
This then still gives me a Rotation of 3 in the DOP file, but a Rotation of 0 in the database.
If I then “reset” the rotation in PL5 and this gives me a rotation of 0 in the DOP file but a Rotation of NULL in the database.
But the image is still rotated but 90°CW in the Library, the Filmstrip and the main editing pane in PL5.
I have also done the same test with an XMP sidecar for a RAW file and get the same results.
Neither the RAW file nor the XMP file have their Orientation changed.
If I return the test file to its starting orientation in my app, ExifTool gives me…
[EXIF] Orientation : Rotate 270 CW
Now, I export the file to a JPEG and, upon reading it, ExifTool gives me…
[EXIF] Orientation : Horizontal (normal)
…
[XMP] Orientation : Horizontal (normal)
Changing the Rotation to 90°CW in PL5 and re-exporting the file still gives me…
[EXIF] Orientation : Horizontal (normal)
…
[XMP] Orientation : Horizontal (normal)
There is something seriously wrong here.