0
我试图使用BitmapFactory解码位图,但它使我的输出位图的高度和宽度等于0。有些帮助我。我的代码如下。位图myBitmap = BitmapFactory.decodeByteArray(byteArray,0,byteArray.length);给出的尺寸0
Bitmap myBitmap = BitmapFactory.decodeByteArray(bFile, 0, bFile.length);
System.out.println("heigth => "myBitmap.getHeight() + " width => " + myBitmap.getWidth());
其中bFile是从.ico文件生成的字节数组。
在此先感谢!
看一看这个问题并设置答案。 http://stackoverflow.com/questions/2690503/can-bitmapfactory-decodefile-handle-ico-windows-icons-files我不完全确定Android操作系统本身支持ico文件 – trumpetlicks