View Single Post
Old 07-27-2009, 10:16 AM   #5 (permalink)
toscaty
New Member
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: rogers
Posts: 11
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

What did you end up doing to fix this issue? I have exactly the same problem - but I throw the exception "illegalArgumentException" only on the device and not on the simulator - I am using a Databuffer and reading from an http connection - then I get the entire image and scale it down - but it keeps throwing this exception??

DataBuffer db = new DataBuffer();
byte[] data1 = new byte[256];

int chunk = 0;
while((chunk = input.read(data1)) != -1)
{
db.write(data1, 0, chunk);
}

input.close();
c.close();
data1 = db.getArray();
panel1 = Bitmap.createBitmapFromBytes( data1, 0, -1, 3 );
Offline   Reply With Quote