Disable (or detect) automatic orientation rotation
When I open a JPEG image in Photoshop (CS3, Mac), Photoshop automatically rotates it based on the camera orientation sensor data, if available. Very nice. However, this is causing a headache for me in a set of Javascript scripts I'm working on.
Very briefly, I have one script in InDesign that exports a list of all of the images used in the document, their sizes and the size and location of their containing box (i.e. the crop area). I have a second script in Photoshop that reads this list and crops and resizes the images to exact size. This works great except when the Photoshop helpfully rotates an image's orientation for me. Because InDesign doesn't also rotate the image automatically, the two disagree on the image's orientation ("0 rotation" to InDesign is landscape, while Photoshop opens it in portrait). Then all the sizes and coordinates are wrong, obviously.
Is there a way to prevent Photoshop from doing that automatic rotation, or at least to detect that it has happened (including the direction of rotation) from within my script? If I can tell that it has happened, at least I can adjust my coordinates accordingly. But disabling it competely (ideally from within the script, so it would continue to work for normal interactive use) would be a lot nicer.
Thanks!
