igreenwood / SimpleCropView

A simple image cropping library for Android.
MIT License
2.48k stars 466 forks source link

Getting IO error on saving image to uri IO Error #116

Open techietrainings opened 7 years ago

techietrainings commented 7 years ago

Invalid image. java.io.IOException: Invalid marker: 89 at android.media.ExifInterface.getJpegAttributes(ExifInterface.java:1616) at android.media.ExifInterface.loadAttributes(ExifInterface.java:1341) at android.media.ExifInterface.(ExifInterface.java:1058) at com.isseiaoki.simplecropview.util.Utils.copyExifInfo(Utils.java:117) at com.isseiaoki.simplecropview.CropImageView.saveImage(CropImageView.java:1316) at com.isseiaoki.simplecropview.CropImageView.access$2100(CropImageView.java:58) at com.isseiaoki.simplecropview.CropImageView$9.run(CropImageView.java:1722) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)

igreenwood commented 7 years ago

Hi,

This link may help you. https://github.com/square/picasso/issues/1504

SammyO commented 6 years ago

I'm getting this Exception too. How to fix it?

IvanWooll commented 5 years ago

If anybody else is facing this issue you can try the following setting setCompressFormat(Bitmap.CompressFormat.JPEG) It worked for me