The underscores in your partial sample indicates that your using what
RFC3548 calls "Base 64 Encoding with URL and Filename Safe
Alphabet" (see http://www.faqs.org/rfcs/rfc3548.html). I use this,
too, in some places, but not images.

The RFC also says:

   This encoding should not be regarded as the same as the "base64"
   encoding, and should not be referred to as only "base64".  Unless
   made clear, "base64" refer to the base 64 in the previous section.

I'm not sure, but perhaps the browser can't recognize this variation
in an image. Try encoding with true Base 64 and see what you get.

On May 10, 5:29 am, gadev <george.agiasog...@newsint.co.uk> wrote:
> I am using GWT 2.3 and GAE 1.4.3.
>
> I have images stored as blobs in the datastore and wish to display
> them in a CellTable. One of the columns of the CellTable has got
> ImaceCell.
>
> I extract the byte[] from the blob then I use the Base64Utils, String
> image = Base64Utils.toBase64(byteArray);
>
> and send the result to the client via GWT-RPC.
>
> Printing directly the string on the screen, the output looks like:
> data:image/jpeg;base64,_9j_4AAQSkZJR.........
>
> However, the image is not being displayed on the table, or even if use
> the Image widget from GWT, such as Image img = new
> Image(encodedString);
>
> Inspecting the element on chrome shows <img src="#"> and console
> displays the following warning, Resource interpreted as Image but
> transferred with MIME type text/html.
>
> I guess for the image to be displayed the mime type should have been
> image/jpeg.
>
> Am I missing anything? Is what I am doing possible?
>
> Thanks in advance,
> G

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

Reply via email to