Sending image data over RPC... how do you plan to use this binary data
on the client side?
It's not possible... JavaScript does not have any image-processing
API.

You can do something like this:

- Create the image binary data on the server, and label it with some
unique ID (store in memory, filesystem, db wherever).
- Create a servlet, say ServeImageServlet that will do something like
this

   doGet(...) {
     String id = request.getParameter("imageID");
     InputStream input = huntForImageUsingID(id);
     response.setContentType("image/png"); // or jpg, gif...

     OutputStream output = response.getOutputStream();
     //copy all data from input to output
   }

- In your RPC response, just send the URL.
    Assuming that the servlet is mapped to /img, the URL can be
something like /img?imageID=abcd

- In the GWT app, use this URL to create a new Image(url)



--
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.com


On Nov 29, 12:20 pm, Noor <[email protected]> wrote:
> Thus,the object will contain an image

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to