1

我一直在尝试如下解码图像:

            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);

虽然我得到了一张图片,但它没有被解码并抛出这个错误:

09-29 11:27:38.675:调试/skia(14907):---解码器->解码返回假

我正在关注处理skia错误的这段代码: http ://code.google.com/p/shelves/source/browse/trunk/Shelves/src/org/curiouscreature/android/shelves/util/ImageUtilities.java

但这并不能解决问题。

有人可以帮忙吗?

4

1 回答 1

0

检查此错误报告:

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

于 2011-10-02T05:40:16.090 回答