[Zope] Zope and Image display

J Cameron Cooper zope-l at jcameroncooper.com
Tue Dec 13 17:07:35 EST 2005


tyson wrote:
> Hi-
>  I have a dtml form that loads a binary image from a python script.  
> This works fine with no problems, but I want to return the image and 
> also some other data as well.  The only thing is when I return the 
> information in the form of a list, my image won't load.  I think that 
> the list automatically changes the binary image into a string or 
> something. Does anybody know about this or some work around by any chance?

The data that defines an images cannot be placed in HTML. The webbish 
way of doing things is to link to an external resource, which is what 
the 'src' in an 'img' tag is all about.

You may return an image from a Python script, but since you have to tell 
your web browser "Hey, that there resource is an image, go fetch it" it 
cannot work to return anything but the binary data.

		--jcc
-- 
"Building Websites with Plone"
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.com


More information about the Zope mailing list