bitmapfactory decodeByteArray null pointer error

All your problems with Audio, Video and Images.

bitmapfactory decodeByteArray null pointer error

Postby althejandro » Tue Mar 08, 2011 1:24 am

I'm trying to pass a byte array from an image to an activity through a bundle
when i try to decode array into a bitmap i get a null pointer exception which FC's (running on physical phone)
I've been going through line by line and this is the only thing creating an error

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  2.                 //grab byte array taken
  3.                 Intent sent = this.getIntent();
  4.                 Bundle arrayForPic = sent.getExtras();
  5.                 byte[] picArray = arrayForPic.getByteArray("pictureArray");
  7.                 //convert array into bitmap
  8. //null error happens HERE
  9.                 Bitmap thumbnail = BitmapFactory.decodeByteArray(picArray, 0, picArray.length);
Parsed in 0.012 seconds, using GeSHi

I've been searching for hours! please help!
Posts: 3
Joined: Sun May 30, 2010 5:57 pm


Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 2 guests