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
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
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);
3 matches
Mail list logo