I am creating an application that displays many images created in Imagemagick PDF files. Some images cannot be uploaded using BitmapFactory. It just returns the null istead bitmap.
The magazine says:
D/skia(15101): --- decoder->decode returned false
This is not a memory problem, as some of the images with the problem are very small, and the images are not damaged, because I can display them on any other machine. In addition, BitmapFactory can decode width and height if I use
inJustDecodeBounds = true;
in the parameters.
I tried to download one of the images using an external image viewer ( QuickPic ) with no luck. It also returns a “Download Error”, indicating that SKIA believes the image is corrupt or at least not supported for any reason.
One of the images that do not work can be found here.
The full code that I use to download it is here
BitmapFactory.Options o = new BitmapFactory.Options(); o.inJustDecodeBounds = true; BitmapFactory.decodeFile(FILENAME,o); int width = o.outWidth; int height = o.outHeight; BitmapFactory.Options o2 = new BitmapFactory.Options(); o.inJustDecodeBounds = false; Bitmap bitmap = BitmapFactory.decodeFile(FILENAME,o2);
Any idea of what's wrong or how to get around it is welcome.
source share