Hi,
This is not possible. fairly you can either use Bitmap bitmap;
bitmap.compress function to get the bytes to the buffer or you can use
getInt().
On Mon, Apr 5, 2010 at 4:54 PM, Pinheiro <[email protected]> wrote:

> I'm trying to draw an image downloaded from the web but keep getting
> the error "Cannot cast from Bitmap to byte[]". Here's the code
> snippet:
>
>
>        BufferedInputStream bis = new
> BufferedInputStream(somethingdownloaded);
>        DataInputStream dis = new DataInputStream(bis);
>        Bitmap image;
>
>        dis.read((byte[]) image); // "Error: cannot cast"
>
> What am I doing wrong?
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to