-
Notifications
You must be signed in to change notification settings - Fork 1.1k
java.io.IOException: Image failed to decode using JPEG decoder #177
Comments
Same here. Sounds like a JPEG and not JPG encoded. |
I have the same problem. Any solutions? |
I did a little research and it seems that the BitmapRegionDecoder that this library uses to decode the cropped region has a number of problems which are caused because of the Skia library that BitmapRegionDecoder uses. The Skia library seems to has a number of unfixed bugs and although it displays the vast majority of images properly, there are numerous problems while displaying CMYK JPGs, and/or grayscale PNGs. One possible solution, according to the creator of another library which is experiencing similar problems because of BitmapRegionDecoder, is to use a custom decoder. It would be great if this problem is solved in the future releases of this library, but frankly I don't know the complexity behind the custom decoder implementation. Here are some useful links: Hope this helps |
This lib is definitely not production ready. You should point this out on the main page. |
I have managed to get around this problem. BitmapFactory has no problem decoding the image, however BitmapRegionDecoder fails. When BitmapRegionDecoder fails, I decode the full image using BitmapFactory and then compress to a temp file. Reassign the Uri and then start again. |
and image is this:
http://i.imgur.com/647p8ys.jpg?1
The text was updated successfully, but these errors were encountered: