make sure to add "data:image/gif;base64," before the data it self as in <img src="data:image/gif;base64,R0lGODlhUAAPAKIAAAsLav/// 88PD9WqsYmApmZmZtZfYmdakyH5BAQUAP8ALAAAAABQAA8AAAPb WLrc/jDKSVe4OOvNu/ 9gqARDSRBHegyGMahqO4R0bQcjIQ8E4BMCQc930JluyGRmdAAcdiigMLVr ApTYWy5FKM1IQe+Mp+L4rphz +qIOBAUYeCY4p2tGrJZeH9y79mZsawFoaIRxF3JyiYxuHiMGb5KT kpFvZj4ZbYeCiXaOiKBwnxh4fnt9e3ktgZyHhrChinONs3cFAShFF2JhvCZlG5uchYNun5eedRxM AF15XEFRXgZWWdciuM8GCmdSQ84lLQfY5R14wDB5Lyon4ubwS7jx9NcV9/j5+g4JADs=" alt="British Blog Directory" width="80" height="15" />
On Jun 9, 2:15 pm, Jiahua Huang <[email protected]> wrote: > On Tue, Jun 9, 2009 at 4:51 PM, Zhang Huangbin<[email protected]> wrote: > > Any example? > > #!/usr/bin/python > # -*- coding: UTF-8 -*- > > import web > > urls = ( > "/", "index", > "/img", "img", > ) > > app = web.application(urls, globals()) > > class index: > def GET(self): > return "<img src='/img' />" > pass > > class img: > def GET(self): > web.header('Content-Type', 'image/png') > return "***BASE64 ENCODED STRING HERE***" > pass > > if __name__ == "__main__": > app.run() --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
