Bug Report
Plugin(s)
@capacitor/camera 8.0.2
Capacitor Version
Capacitor Doctor
Latest Dependencies:
@capacitor/cli: 8.5.0
@capacitor/core: 8.5.0
@capacitor/android: 8.5.0
@capacitor/ios: 8.5.0
Installed Dependencies:
@capacitor/cli: 8.4.0
@capacitor/core: 8.4.0
@capacitor/ios: 8.4.0
@capacitor/android: 8.4.0
[success] Android looking great!
Platform(s)
Android. Did not test on iOS.
Current Behavior
The new takePhoto method ignores the new targetWidth and targetHeight options.
Expected Behavior
The resulting image should have a resolution that matches the targetWidth and targetHeight specified in the Camera.takePhoto method.
Code Reproduction
const imageResult: MediaResult = await Camera.takePhoto({
quality: 80,
editable: "no",
includeMetadata: true,
cameraDirection: CameraDirection.Rear,
correctOrientation: true,
targetWidth: 1024,
targetHeight: 768
})
const fileResult: ReadFileResult = await Filesystem.readFile({ path: imageResult.uri })
/* examining the data in fileResult.data gives an image with a resolution of 3456x4608 */
/* rather than the requested resolution of 1024x768 */
Other Technical Details
Additional Context
Bug Report
Plugin(s)
@capacitor/camera 8.0.2
Capacitor Version
Platform(s)
Android. Did not test on iOS.
Current Behavior
The new takePhoto method ignores the new targetWidth and targetHeight options.
Expected Behavior
The resulting image should have a resolution that matches the targetWidth and targetHeight specified in the Camera.takePhoto method.
Code Reproduction
Other Technical Details
Additional Context