Describe the bug
When images have rotation information embedded within their Exif information, Coil should use that to automatically rotate the image correctly.
This is something that other image libraries (Glide, Picasso) do already. Using the AndroidX ExifInterface library allows you to extract the orientation information from any Uri / InputStream.
To Reproduce
You can use this sample image.
Expected behavior
The image should be rotated correctly.
Logs/Screenshots
n/a
Library version
0.6.1
Thanks for the report. Coil already uses the AndroidX Exif library as part of BitmapFactoryDecoder and should be automatically handling rotations, but I'll run the sample image to see what Coil's missing. I have a test here as well to cover all the rotations.
FWIW, the case I was testing was loading the image via Uri - specifically, from a local ContentProvider. I suppose a FileProvider generated Uri would be similar enough for testing purposes.
Confirmed. Going to look into fixing this today.
Most helpful comment
FWIW, the case I was testing was loading the image via
Uri- specifically, from a localContentProvider. I suppose aFileProvidergeneratedUriwould be similar enough for testing purposes.