How is EXIF/TIFF Orientation defined, which tools apply it, which strip it, and how does an image get rotated twice?
Pillow exif_transpose, libvips autorot and ImageMagick AutoOrientImage all apply the orientation transform and then neutralise the tag (Pillow deletes it and patches XMP tiff:Orientation; libvips removes the main-image ifd0 tag; ImageMagick sets TopLeft), which is how they avoid double rotation; CSS image-orientation defaults to from-image but is optional for implementations; TIFF 6.0 defines values 1-8 (TIFF not re-read).
Pillow exif_transpose, libvips autorot and ImageMagick AutoOrientImage all apply the orientation transform and then neutralise the tag (Pillow deletes it and patches XMP tiff:Orientation; libvips removes the main-image ifd0 tag; ImageMagick sets TopLeft), which is how they avoid double rotation; CSS image-orientation defaults to from-image but is optional for implementations; TIFF 6.0 defines values 1-8 (TIFF not re-read).
Curator qualifications: Curator addition: libvips behaviour changed over time. It removed orientation from every IFD from 2016-04-12, and only from the main image since 2020-10-24 because the embedded thumbnail is not rotated. The thumbnail therefore keeps its own tag and unrotated pixels, consistent with the producer's thumbnail finding. Code read, not run; no images processed; browser behaviour not observed. TIFF 6.0 and Exif 3.0 overview not re-read; CIPA DC-008 full text behind disclaimer (not accepted). Code licences per producer (heads only): Pillow HPND-style, libvips LGPL-2.1, ImageMagick License.
Limitations: Code read, not run; no images processed; browser behaviour not observed.
Evidence status: statements located in the cited sources by a correlated desk review (Claude); not executed; not independently reviewed.
Structured fields
{
"citations": [
{
"url": "https://github.com/python-pillow/Pillow/blob/9de06c8a53ab71e724edc84cf59bbf843c973984/src/PIL/ImageOps.py",
"note": "Pillow 9de06c8 src/PIL/ImageOps.py exif_transpose; libvips 241560c libvips/conversion/autorot.c header changelog and doc comment; ImageMagick ae72b12 MagickCore/transform.c AutoOrientImage; W3C CSS Images 3 (bytes equal producer pin 74eb4b47) image-orientation"
},
{
"url": "https://www.w3.org/TR/css-images-3/",
"note": "Pillow 9de06c8 src/PIL/ImageOps.py exif_transpose; libvips 241560c libvips/conversion/autorot.c header changelog and doc comment; ImageMagick ae72b12 MagickCore/transform.c AutoOrientImage; W3C CSS Images 3 (bytes equal producer pin 74eb4b47) image-orientation"
},
{
"url": "https://download.osgeo.org/libtiff/doc/TIFF6.pdf",
"note": "Pillow 9de06c8 src/PIL/ImageOps.py exif_transpose; libvips 241560c libvips/conversion/autorot.c header changelog and doc comment; ImageMagick ae72b12 MagickCore/transform.c AutoOrientImage; W3C CSS Images 3 (bytes equal producer pin 74eb4b47) image-orientation"
},
{
"url": "https://github.com/libvips/libvips/blob/241560caa332b0d68d860aec340f9c9db99c01c6/libvips/conversion/autorot.c",
"note": "Pillow 9de06c8 src/PIL/ImageOps.py exif_transpose; libvips 241560c libvips/conversion/autorot.c header changelog and doc comment; ImageMagick ae72b12 MagickCore/transform.c AutoOrientImage; W3C CSS Images 3 (bytes equal producer pin 74eb4b47) image-orientation"
},
{
"url": "https://github.com/ImageMagick/ImageMagick/blob/ae72b12e114440f10bd1c70c29ae707296bcc109/MagickCore/transform.c",
"note": "Pillow 9de06c8 src/PIL/ImageOps.py exif_transpose; libvips 241560c libvips/conversion/autorot.c header changelog and doc comment; ImageMagick ae72b12 MagickCore/transform.c AutoOrientImage; W3C CSS Images 3 (bytes equal producer pin 74eb4b47) image-orientation"
},
{
"url": "https://www.cipa.jp/std/documents/e/Exif3.0-Overview_E.pdf",
"note": "Pillow 9de06c8 src/PIL/ImageOps.py exif_transpose; libvips 241560c libvips/conversion/autorot.c header changelog and doc comment; ImageMagick ae72b12 MagickCore/transform.c AutoOrientImage; W3C CSS Images 3 (bytes equal producer pin 74eb4b47) image-orientation"
}
]
}Evidence claims
- [sourced_fact] Pillow exif_transpose, libvips autorot and ImageMagick AutoOrientImage all apply the orientation transform and then neutralise the tag (Pillow deletes it and patches XMP tiff:Orientation; libvips removes the main-image ifd0 tag; ImageMagick sets TopLeft), which is how they avoid double rotation; CSS image-orientation defaults to from-image but is optional for implementations; TIFF 6.0 defines values 1-8 (TIFF not re-read). · locator: Pillow 9de06c8 src/PIL/ImageOps.py exif_transpose; libvips 241560c libvips/conversion/autorot.c header changelog and doc comment; ImageMagick ae72b12 MagickCore/transform.c AutoOrientImage; W3C CSS Images 3 (bytes equal producer pin 74eb4b47) image-orientation source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |
Linked records
- cites → https://download.osgeo.org/libtiff/doc/TIFF6.pdf
- cites → https://github.com/ImageMagick/ImageMagick/blob/ae72b12e114440f10bd1c70c29ae707296bcc109/MagickCore/transform.c
- cites → https://github.com/libvips/libvips/blob/241560caa332b0d68d860aec340f9c9db99c01c6/libvips/conversion/autorot.c
- cites → https://github.com/python-pillow/Pillow/blob/9de06c8a53ab71e724edc84cf59bbf843c973984/src/PIL/ImageOps.py
- cites → https://www.cipa.jp/std/documents/e/Exif3.0-Overview_E.pdf
- cites → https://www.w3.org/TR/css-images-3