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

Some pictures are shown upside down on Android 10 #10

Open
rignaneseleo opened this issue Jul 27, 2020 · 1 comment
Open

Some pictures are shown upside down on Android 10 #10

rignaneseleo opened this issue Jul 27, 2020 · 1 comment

Comments

@rignaneseleo
Copy link

rignaneseleo commented Jul 27, 2020

Hi, some pictures I'm loading on Android 10 are shown upside down.
This is the piece of code I'm using:

Media m = Media.fromJson({
        "id": entity.id,
        "mediaType": type == AssetType.image ? "image" : "video",
        "height": entity.height,
        "width": entity.width,
        "creationDate": entity.createDtSecond ?? 0,
      });
var thumb =
          await m.getThumbnail(height: size, width: size, highQuality: false);

return Container(
          child: Stack(
        alignment: Alignment.topCenter,
        children: [
          Image.memory(
            thumb,
            fit: BoxFit.cover,
            width: double.infinity,
            height: double.infinity,
          ),
        ],
      ));

This is one of the picture as example: https://drive.google.com/file/d/1_Y7OOa9chJUSsECUHbJPIZOFg1tFaFzx/view?usp=sharing

EDIT: I think the error is the logic in rotatedBitmap method in MediaGalleryPlugin.kt

rignaneseleo added a commit to rignaneseleo/media_gallery that referenced this issue Jul 28, 2020
@benwinding
Copy link

To use this fix in your flutter project, add this to the pubspec.yaml

  media_gallery:
    git:
      url: git://github.com/rignaneseleo/media_gallery
      ref: f277e8c5955bc824feb700600d641df75329124e

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