Open rignaneseleo opened 4 years ago
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
rotatedBitmap
MediaGalleryPlugin.kt
To use this fix in your flutter project, add this to the pubspec.yaml
pubspec.yaml
media_gallery: git: url: git://github.com/rignaneseleo/media_gallery ref: f277e8c5955bc824feb700600d641df75329124e
Hi, some pictures I'm loading on Android 10 are shown upside down. This is the piece of code I'm using:
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 inMediaGalleryPlugin.kt