loic-hamdi / multiple_images_picker

MIT License
4 stars 14 forks source link

When selecting a large image file, the error "png error tEXt: chunk data is too large" occurs. #8

Open maru7239 opened 1 year ago

maru7239 commented 1 year ago

Bug Report

multiple_images_picker: 1.0.1

Is it happening on Android: Yes

Is it happening on iOS: unknown

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.10.3, on Microsoft Windows [Version 10.0.22621.2428], locale ja-JP)
[√] VS Code (version 1.79.2)
[√] Connected device (4 available)
[√] Network resources

Describe the bug

When a large image file is selected, the error "png error tEXt: chunk data is too large" occurs.

This error cannot be caught by try-catch. Ideally, the behavior would be to issue a dialog that says something like "The selected file size is too large" to induce the user to select an image with a smaller size. However, since error handling is not possible, users of the application will mistakenly think that nothing will happen when they run "MultipleImagesPicker.pickImages" and select images from an album.

Is there any workaround for this?

Thank you for creating such a wonderful package.

Postscript.

When I tried to post the large capacity image that caused this issue with other applications, I got the following results.

Instagram: When selecting a large image from an album, an error message appears saying that "the image could not be loaded".

Threads: no large capacity images appear on the album in the first place

If we can handle the error handling on our side, we would like to give an error message like "Could not load the image".