1

I have been trying to decode an image as follows:

            String dat = jobJect.getString("dat");
            client = new DefaultHttpClient();
            String url2 = url1 + dat;
            request = new HttpGet(url2);
            request.setHeader("Cookie", "hcsid=" + GlobalConfig.hcSid);
            response = client.execute(request);
                            BufferedHttpEntity bufHttpEntity = new BufferedHttpEntity(
                    response.getEntity());
            InputStream im = bufHttpEntity.getContent();

                    OutputStream out = null;

                    final ByteArrayOutputStream dataStream = new ByteArrayOutputStream();
                    out = new BufferedOutputStream(dataStream, IO_BUFFER_SIZE);
                    CameraActivity.copy(im, out);
                    out.flush();

                    final byte[] data = dataStream.toByteArray();
                    mBitMap = BitmapFactory.decodeByteArray(data, 0, data.length);

Although I get an image, it doesn't get decoded and throws this error:

09-29 11:27:38.675: DEBUG/skia(14907): --- decoder->decode returned false

I'm following this code which handles a skia error: http://code.google.com/p/shelves/source/browse/trunk/Shelves/src/org/curiouscreature/android/shelves/util/ImageUtilities.java

But it doesn't solve the issue.

Can anyone please help?

1 Answer 1

0

Check this bug report:

http://code.google.com/p/android/issues/detail?id=9064

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.