0

How to resize image height and width from image picker and save it as a file. I tried decodeImage and copyResize then encodePng but I have issue it blocks ui thread, is there another way?

[UPDATED]

There are some solutions like:

  • ResizeImage
  • instantiateImageCodec

But how I use it and get the image as a file after resizing?

mhmd
  • 395
  • 4
  • 19
  • Does this answer's your question? https://stackoverflow.com/questions/49701654/how-can-i-read-from-disk-and-resize-an-image-in-flutter-dart – Muhammad Hussain Aug 22 '22 at 15:09
  • I did that like I said in the question, I had issue. it blocks ui thread. – mhmd Aug 22 '22 at 15:21
  • I found a solution in some answers like using ```ResizeImage``` but how I convert it then to a File? – mhmd Aug 22 '22 at 15:33

0 Answers0