Image is not well rotated on Android 8
ProtocolNebula opened this issue · 2 comments
ProtocolNebula commented
Hi,
I installed the package the previous week to fix the rotation image issue in latest iOs versions, but today we notice that the image is get rotated in Android 8 (my current phone) with the latest WebKit version (we wrapp the application with cordova.js and is written in top of Angular 9).
The bug is only for vertical images.
Android details:
- Samsung Galaxy S7 Edge
- Android 8.0.0
- Webview Version: the latest one (13 oct 2020)
- Latest Chrome version installed
This is the code I'm using to read and rotate the image:
return from(
loadImage(file.file, {
canvas: true,
maxWidth: this.optimizeImages.maxWidth,
maxHeight: this.optimizeImages.maxHeight,
orientation: true,
})
).pipe(
switchMap(
(data: any) =>
new Observable((observable) => {
data.image.toBlob((blob) => {
data.blob = blob;
observable.next(data);
observable.complete();
}, "image/jpeg");
})
)
).subscribe(() => {});
Any suggestion?
Thanks,
Best regards.
ProtocolNebula commented
Fixed, it was a bug with a cordova.js plugin.
blueimp commented
Glad you could fix it and thanks for clearing that up @ProtocolNebula!