Skip to main content

converting image to byte[] in cldc, midp2.0 devices

1 reply [Last post]
Joined: 2007-07-14

Hello Friends,

I need to convert a image to byte[] for sending an image to server. can anyone suggest me any solution. I am developing on MOTOROKR E 6 handset.

i have already searched whole net & even methods on this thread didn't help me.

The fuzz is that the mobile is running Linux OS & emulator started giving Null Pointer Exceptions when i tried to implement a few methods( i don't know why)

Also when i passed a static byte[] of captured image to connection thread it again yelled Null Pointer Exception.

I am sick of this mobile pulling my hairs since last 4 days. so plz help me

thanks a lot


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-03-04


Can you provide more info? What platform are you running on? What is the application code you are using? And where is the NPE (NullPointerExc) being thrown?

Generally, getRGB(...) is the correct way of accessing the image data. I suspect you have an uninitialized reference somewhere in your code.

-- Terrence