How can we convert an image into byte array? Actually I have to send the captured image to server from the device.
How can we convert an image into byte array? Actually I have to send the captured image to server from the device.
please visit this http://www.java-tips.org/java-me-tip...-from-rms.html
You could also have a look at this link.
There is some good advice there and also some code is which you could probably use.
hi
you can do this by this way
1) connect to the server
2) read the file byte by byte and send it to the server using a buffer.
3) read the end of file and infrom the server that u are done
4) at the server save the file.
feel free to disscuss if u have any doubt.
regards
Arun Gupta
Hi arungupta_2jan,
I have written already for connecting to the server. But I am getting problem in converting the image byte by byte into byte array. The above examples in the links are more confusing. Please tell me how to achieve this if possible by some examples..
Are you sure you want to convert the image into byte array? When you send a captured image from the device to the server the file is to be read byte by byte. You can convert the file in binary and then you can send to the server. So would that serve your purpose?
Thankx
Joy
ok Joy I think that may be a good idea for this.