fluttercandies / flutter_photo_manager

A Flutter plugin that provides images, videos, and audio abstraction management APIs without interface integration, available on Android, iOS, macOS and OpenHarmony.
https://pub.dev/packages/photo_manager
Apache License 2.0
647 stars 297 forks source link

[Bug report] size of the originFile is wrong #1123

Open coronoal opened 1 month ago

coronoal commented 1 month ago

Version

3.1.0

Platforms

iOS

Device Model

iPhone 12 (iOS17.4.1)

flutter info

Flutter 3.19.6

How to reproduce?

iOS device. get the originFile of the photo, then to display it or save it locally, the size of the picture is wrong. 1:1, 4:3, 16:9 will all become 4:3

but 3.0.0 correct

Logs

No response

Example code (optional)

void saveByAssetEntity(AssetEntity assetEntity) async {
    // get originFile
    var file = await assetEntity.originFile;

    // save it locally or display
    var result = await PhotoManager.editor.darwin.saveImageWithPath(
      imageFile: file!.path,
      title: 'IMG_123',
    );

    // 1:1, 4:3, 16:9 will all become 4:3
  }

Contact

No response