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.


Reply via email to