Possible Duplicate:
how to convert image to byte array in java?
Hi,
Can anybody help me convert a picture to byte array in java?
thank you
Possible Duplicate:
how to convert image to byte array in java?
Hi,
Can anybody help me convert a picture to byte array in java?
thank you
Point a File object to your picture location and then use a Scanner to read every byte. Something like:
int count=0; File f = File("path"); Scanner sc = new Scanner(f);
while(sc.hasNextByte()) { your_array[count] = sc.nextByte(); count++; }
I didnt test this so dont trust me on everything