image_crop icon indicating copy to clipboard operation
image_crop copied to clipboard

Image is not displayed when reselecting previously cropped image

Open sonlam103 opened this issue 4 years ago • 9 comments

Hi, I use your lib for crop image, but I encountering an error, which image is not displayed when reselecting previously cropped image. I pass an image file to image crop screen, then I crop it, after I reselect it (origin image) from the gallery, then it do not display on screen. Step:

  1. Select an image from the gallery.
  2. Cover to file, pass it to crop screen.
  3. Crop it, and back to before screen.
  4. Select previously an image from the gallery.
  5. Cover to file, pass it to crop screen ==> image do not display (I attach file).

Screenshot_20211122-114427.

And this is my code for crop image screen (I modified from your example) https://drive.google.com/file/d/16i3bn5xUELg23mw3UOCOqdN88JHaHOb8/view?usp=sharing

Anyone helps, thanks!

sonlam103 avatar Nov 22 '21 09:11 sonlam103

Same issue here!

guilhermedaldim avatar Nov 25 '21 17:11 guilhermedaldim

I have same issue

mori-heidari avatar Dec 04 '21 08:12 mori-heidari

Same issue here!

Niko-by avatar Dec 06 '21 18:12 Niko-by

I think the problem is in the file_picker plugin. I tried to get the file via image_picker and the problem went away.

XFile file = await ImagePicker().pickImage(source: ImageSource.gallery);

Niko-by avatar Dec 06 '21 18:12 Niko-by

Try image.evict()

l-7-l avatar Mar 10 '22 08:03 l-7-l

Same issue here!

mariusbloemhof avatar Apr 05 '22 18:04 mariusbloemhof

Try image.evict()

I have same issue, I use photo_manager library

with this code, sloved problem

in crop file, in didChangeDependencies() and didUpdateWidget() add this line.

thanks

fn-19 avatar Oct 06 '22 08:10 fn-19