Skip to main content

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

1 reply [Last post]
scientist_rahul
Offline
Joined: 2007-07-14
Points: 0

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.

http://forum.java.sun.com/thread.jspa?threadID=617676&tstart=120

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

Rahul

Reply viewing options

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

Hi,

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