Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image is not well rotated on Android 8 #126

Closed
ProtocolNebula opened this issue Oct 19, 2020 · 2 comments
Closed

Image is not well rotated on Android 8 #126

ProtocolNebula opened this issue Oct 19, 2020 · 2 comments

Comments

@ProtocolNebula
Copy link

ProtocolNebula commented Oct 19, 2020

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
Copy link
Author

Fixed, it was a bug with a cordova.js plugin.

@blueimp
Copy link
Owner

blueimp commented Oct 20, 2020

Glad you could fix it and thanks for clearing that up @ProtocolNebula!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants