画像のEXIFタグを考慮して写真を回転するには
スマートフォンで撮影した写真は,EXIFタグのorientationにより,90
°の回転がかけられていることがあります。
参考: EXIFタグの検証にはexiftoolが便利です。
向きを調べるには
exiftool -Orientation -n image.jpg
向きを変えるには
exiftool -Orientation=8 -n image.jpg
向きはGET PICTURE METADATAでGETすることができます。残念ながらSETすることはできません。
var $orientation : Integer
GET PICTURE METADATA($image; TIFF orientation; $orientation)