<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Great, at last someone has taken care about this, but doing something
like this (in #renderContentOn);<br>
<br>
html<br>
imageMapWithAction: [:x | x halt]<br>
form: (WAForm formFromFileNamed: 'img\main.png').<br>
<br>
..displays what to my knowledge is an 8-bit image, whatever the origin,
the colors are all mocked up, what could be wrong? (tried with gif as
well, real 8-bit renders ok)<br>
<br>
Chris<br>
<br>
<br>
Brent Pinkney wrote:
<blockquote cite="midopsrjy3uzrh9xbke@sandtonsvr" type="cite">Hi,
<br>
<br>
I am battling to get images to be rendered correctly.
<br>
<br>
This problem has appeared on the list before and is caused by the
Seaside API which (correctly) expects a Form instance as opposed to a
file name.
<br>
<br>
However, the the implementation of Form>>asMIMEDocument renders
the Form as a GIF image with 8 bit depth.
<br>
<br>
This caused horrible degradation.
<br>
<br>
Since it is very useful to use filenames in the early part of
development, I have implemented WAForm as a subclass of Form which
remembers its contentType.
<br>
<br>
WAForm overrides asMIMEDocument to answer a document with the original
encoding an depth.
<br>
<br>
This changeset requires a wee fix mimeTypesFor-brp, which is attached.
<br>
<br>
Please advise if this is useful - it does facilitate using posh
functions like
<br>
<br>
html imageMapWithAction: [ :x | x halt. ]
<br>
form: (WAForm formFromFileNamed: 'map.png')
<br>
<br>
Regards
<br>
<br>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Seaside mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Seaside@lists.squeakfoundation.org">Seaside@lists.squeakfoundation.org</a>
<a class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/listinfo/seaside">http://lists.squeakfoundation.org/listinfo/seaside</a>
</pre>
</blockquote>
<br>
</body>
</html>