Hi,

I convert an Image to bye array in Java (web-services) and send it to a python client.

At the client side (python code) i receive the bytes, and then i need to transform them into
the image again.

Here is what I am doing:

#**************************************************************
# fileName is the path of the file
stream = service.getFile(fileName)  

file = open("pic.jpeg", 'w')

img = Image.frombuffer("1", (128, 128), stream)
img.save(file)

file.close()
#**************************************************************

The Java method is: "public byte[] getFile(String path)"

This is not working. I am not able to get all the data of the image
and for sure not able to form the complete image.

Any solution for that?

Thank you in advance,

Ziad

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to