apache / apache/cordova-plugin-camera
Android returns HEIF formated images, ignores encodingType
- Dominant language
- Objective-C
- Stars
- 976
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
# Bug Report
## Problem
Android returns HEIF formatted images (ignores encodingType)
On a
- Pixel6,
- Android 13,
- Cordova 12
- Camera Plugin v 7.0.0
- { encodingType : Camera.EncodingType.JPEG }
- getPicture() returns images in HEIF format (both FILE_URI and DATAURL) in HEIF format
- HTML IMG cannot load HEIF format images
### What is expected to happen?
- getCamera should respect encodingType JPEG and return JPEG image
### What does actually happen?
Images returned in HEIF format, HTML img.src = "" fails (calls error handler with 'unsupported format')
- same for both mediaTypes
## Information
- Pixel6,
- Android 13,
- Cordova 12
- Camera Plugin v 7.0.0
- { encodingType : Camera.EncodingType.JPEG }
- getPicture() returns images in HEIF format (both FILE_URI and DATAURL) in HEIF format
- HTML IMG cannot load HEIF format images
### Command or Code
await
### Environment, Platform, Device
### Version information
Cordova: 12.0.0
cordova-android: 12.0.1
Camera 7.0.0
CLI build tools
Android 13 (Pixel 6)
## Checklist
- [x ] I searched for existing GitHub issues
- [x ] I updated all Cordova tooling to most recent version
- [x ] I included all the necessary information above
Contributor guide
Research direction
Start by reproducing getPicture() on the listed Pixel 6, Android 13, Cordova, and Camera plugin versions with encodingType set to JPEG. Trace how the Android camera path handles that option for both FILE_URI and DATAURL results. Done means both results are JPEG images that an HTML img element can load.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100