flutter_image_compress
flutter_image_compress copied to clipboard
Stop reading file since a wrong offset may cause an infinite loop
Hi,
I am trying to use this library to fix the camera rotation issue, but everytime I call FlutterImageCompress.compressWithList I receive the following message. The same happens if I call compressWithFile.
W/ExifInterface( 6731): Skip the tag entry since tag number is not defined: 2 W/ExifInterface( 6731): Stop reading file since a wrong offset may cause an infinite loop: 0 I/chatty ( 6731): uid=10065(com.example.simpleiddemoapp) pool-1-thread-3 identical 2 lines W/ExifInterface( 6731): Stop reading file since a wrong offset may cause an infinite loop: 0
I am using Visual Studio Code, and testing the application with my connected Android Device, version 8.1.0.
Thanks
I may not be able to solve this problem without the information related to the image. I can try to upload the image as an attachment to this issue. I will try to solve it.
If it is not convenient to pass the attachment, you can send the image to me by email. [email protected]
I had this issue too Stop reading file since a wrong offset may cause an infinite loop: 0
the image is from a standard library imagepicker.pickImage().
could you please try reproduce using a file picked from the above?
I'm using the same library "image_picker: ^0.6.1+4" method:
ImagePicker.pickImage(source: ImageSource.camera)
getting a File, and having the same error
Stop reading file since a wrong offset may cause an infinite loop: 0
I also had this problem on android, what I was doing is I was calling await File(path).readFromBytes
twice:
- in function where I get orientation in order to determine what should be
rotate
's value - in
compressImageFile
function What I did to fix it:final List<int> bytes = await File(path).readAsBytes();
and gave this variable in arguments of functions, so now I am callingawait File(path).readFromBytes
just once. This fixed my problem.
I'm using the same library "image_picker: ^0.6.1+4" method:
var image = await ImagePicker.pickImage(source: ImageSource.camera)
&
var image = await ImagePicker.pickImage(source: ImageSource.gallery)
getting a File, and having the following error
ioctl c0044901 failed with code -1: Invalid argument Stop reading file since a wrong offset may cause an infinite loop: 0