Uhm, there is something strange in your issue :D
As the imagedate you should be using has to be base64 and base64 only uses
ascii characters, how can it end up with a unicode error?

Are you sure you aren't trying to put there the binary image data instead
of the base64 representation?


On Wed, Jan 30, 2013 at 10:54 PM, Stuart Zurcher <[email protected]>wrote:

> I would like to pass raw image data in TurboGears2 to the mako template to
> use in an img tag
>
> (ie., scr=data:image/jpg,base64,${imagedata}).
>
> The image is retrieved from sql server image format
>
> I have been struggling to do this as everything passed to the template is
> in unicode and I get "UnicodeDecodeError:'ascii' codec can't decode
> byte..." when the template trys to open it.
>
> This would save considerable time on mulitple calls to the
> /image?image#x.jpg.
>
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/turbogears?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to