[Zope] Using a generated image map
Yves Bastide
Yves.Bastide@irisa.fr
Wed, 28 May 2003 14:08:25 +0200
Oliver Bleutgen wrote:
> Yves Bastide wrote:
>
>> Dieter Maurer wrote:
>>
>>> Yves Bastide wrote at 2003-5-27 15:21 +0200:
>>> > ...
>>> > OK, I'll try to be clearer. _The same_ script does the image and
>>> the > map. If images were inlined in HTML, I'd write something like
>>> > > <div tal:define="img_and_map here/generateImageAndMap">
>>> > <img tal:content="img_and_map/img" usemap="#mymap"/>
>>> > <map name="mymap" tal:replace="structure img_and_map/map"></map>
>>> > </div>
>>>
>>> You know that HTML cannot include an image directly into a page..
>>> It must always go via an URL.
>>>
>>> Thus, you script must make the generated image avaiblable via an
>>> URL and return the URL to the image.
>>
>>
>>
>> Yes. And that's the problem :-)
>>
>> I may store the image in a transient container buried in a temporary
>> folder ... Did it once in the session, but this is gross.
>
>
> I'm interested. Why is this a problem (storing an image in the session)?
> I think the java guys store things in sessions all the time (not that
> this is an argument here ;))
>
A session is per-user, while my images aren't, so there's a small
overhead for too many generations. Furthermore, I expect they'll be
harder to invalidate when the things to draw change
>
> oliver
>
>
Yves