[Seaside] loading jpeg
Michel Bany
m.bany at wanadoo.fr
Tue Aug 1 14:57:21 UTC 2006
Sergio Gianatiempo a écrit :
> i wish to know if there is any way to load a jpeg image into an inst
> var and how to showit in a page using seaside.
Assuming this is for Squeak, here is how you can load the image
instVar := Form fromFileNamed: 'myFile.jpeg'.
Assuming you are using the canvas api, here is how to display it, as gif :
html image form: instVar.
as jpeg :
html image form: instVar; mimeType: 'image/jpeg'.
as png :
html image form: instVar; mimeType: 'image/png'.
You can optionally specify a file name
html image form: instVar; mimeType: 'image/png'; fileName: 'foo.png'.
Enjoy,
Michel.
More information about the Seaside
mailing list