Describe the bug
I found an issue in how Coil handles EXIF orientation metadata on the Wasm target when loading with AsyncImage.
Portrait images taken on iPhones are displayed distorted/stretched, while they work correctly on all other KMP targets. The EXIF orientation metadata of those images is 6 (Rotated 90° CCW).
It appears that Coil is attempting to fit the vertical pixel buffer into horizontal dimensions (or vice versa) without correctly applying the EXIF transformation on the Wasm target.
Validation
I have verified that this is a Coil-specific issue:
- When loading the same image using the standard Compose Multiplatform
Image component with painterResource, it renders correctly.
- The distortion only occurs when the image is processed via Coil on Wasm.
To Reproduce
I have provided a minimal reproducible project with a sample "rotated" image here:: https://github.com/luca-campara/TestCoilWasm
Version
- Coil version 3.4.0
- Kotlin version 2.3.20
- CMP version 1.10.3
Describe the bug
I found an issue in how Coil handles EXIF orientation metadata on the Wasm target when loading with
AsyncImage.Portrait images taken on iPhones are displayed distorted/stretched, while they work correctly on all other KMP targets. The EXIF orientation metadata of those images is 6 (Rotated 90° CCW).
It appears that Coil is attempting to fit the vertical pixel buffer into horizontal dimensions (or vice versa) without correctly applying the EXIF transformation on the Wasm target.
Validation
I have verified that this is a Coil-specific issue:
Imagecomponent with painterResource, it renders correctly.To Reproduce
I have provided a minimal reproducible project with a sample "rotated" image here:: https://github.com/luca-campara/TestCoilWasm
Version