Re: [android-developers] BitmapFactory 's decodeByteArray and decodeStream returns null

2011-09-16 Thread Siji T G
Hello Oscar, Thanks for the reply. But I already tried this approach. ByteArrayInputStream imageStream = new ByteArrayInputStream(data); Bitmap theImage = BitmapFactory.decodeStream(imageStream); *theImage* returned by *decodeStream* is null. Regards Siji -- You received this

[android-developers] BitmapFactory 's decodeByteArray and decodeStream returns null

2011-09-15 Thread Siji T G
I am trying to decode ARGB byte array into bitmap to display it as an image view. I tried using BitmapFactory's decodeByteArray() and decodeStream() but both way gives null as Bitmap. But when I create bitmap using createBitmap () and setPixels it works perfect. Here is the working code. data is

Re: [android-developers] BitmapFactory 's decodeByteArray and decodeStream returns null

2011-09-15 Thread Óscar de la Mata
HI Siji. Have you tried this aproach? public void convert(){ ByteArrayInputStream imageStream = new ByteArrayInputStream(data); Bitmap theImage = BitmapFactory.decodeStream(imageStream); try { File file = FotoFolder.getFotoFile(fileName.png);