[Seaside] Re: html images

German Arduino gsa at arsol.net
Mon Jul 10 21:32:42 UTC 2006


Michel Bany wrote:
> German Arduino a écrit :
> 
>>
>> AFAIK ImageReadWriter use Form which returns ever a gif from its 
>> method asMIMEDocument.
>>
>> I you change such method by:
>>
>> asMIMEDocument
>> | aStream rw |
>>
>>     aStream := RWBinaryOrTextStream on: String new.
>>     rw := PNGReadWriter on: aStream.
>>     rw nextPutImage: self.
>>     rw close.
>>     aStream reset.
>>     ^MIMEDocument contentType: 'image/png' content: aStream contents
>>
>> you will get the png correctly showed.
>>
> I believe there will be no need to change asMIMEDocument if you use this :
> 
>    html imageWithFileNamed:  fn
> 
> Using the above ensures that the image does not get unnecessarily 
> converted to gif.
> HTH
> Michel.

Thanks by the comment Michel, was useful for me.

I've not used #imageWithFileNamed: because I'm yet using Seaside 2.5.

As I understand is a new method in 2.6. Will try ASAP.

Thanks!
gsa.



More information about the Seaside mailing list