--On 30. Mai 2008 10:20:28 +0200 Encolpe Degoute <[EMAIL PROTECTED]> wrote:
Andreas Jung a écrit :--On 30. Mai 2008 12:38:21 +0530 Andyy <[EMAIL PROTECTED]> wrote:i am preparing graphs(MatPlotLib) related files using external methods., when i test them on zope they display very well there. But when i call these external methods using tal as: <Img tal:attributes="src python: context.IterationBar(context) "/> where IterationBar is my external method that displays a BarChart. Or using <img src="/Agile/image.gif" tal:attributes="src context.IteartionBar(context)"/>1) the thing you're calling must return an *URL* not the image data itself...think about how the <img> in HTML works 2) The script called through the given url must return the image data _and_ it must set the proper http headers content-type, and content-lengthIf your site is only for FireFox or evolved browser you can use inline rendering: <img width="81" height="85" src="data:image/gif;base64,R0lGODlhUAAPAKIAAAsLav///88PD9WqsYmApmZmZtZfY mdakyH5BAQUAP8ALAAAAABQAA8AAAPb WLrc/jDKSVe4OOvNu/9gqARDSRBHegyGMahqO4R0bQcjIQ8E4BMCQc930JluyGRmdAAcdiigM LVr ApTYWy5FKM1IQe+Mp+L4rphz+qIOBAUYeCY4p2tGrJZeH9y79mZsawFoaIRxF3JyiYxuHiMGb 5KT kpFvZj4ZbYeCiXaOiKBwnxh4fnt9e3ktgZyHhrChinONs3cFAShFF2JhvCZlG5uchYNun5eed RxM AF15XEFRXgZWWdciuM8GCmdSQ84lLQfY5R14wDB5Lyon4ubwS7jx9NcV9/j5+g4JADs=">
Ouch :-) Andreas
pgpUpKC10NfuI.pgp
Description: PGP signature
_______________________________________________ Zope maillist - [email protected] http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
