Hi Guys,
Very new to Seaside (<24h) but it looks fantastic. I'd like to serve a page with a dynamically created .png file - a callback fires some code to generate a .png, but I have no idea how to serve it back. All the image serving I have been able to do is image files that are either on a web server or already in a FileLibrary. Can any kind soul please help me? Many thanks... |
Hi John,
Welcome to Seaside. I believe that http://comments.gmane.org/gmane.comp.lang.smalltalk.squeak.seaside/21710 contains an answer to your question. James Foster http://seaside.gemstone.com/tutorial.html On Jul 16, 2011, at 2:58 PM, johnhwoods wrote: > Hi Guys, > > Very new to Seaside (<24h) but it looks fantastic. I'd like to serve a page > with a dynamically created .png file - a callback fires some code to > generate a .png, but I have no idea how to serve it back. All the image > serving I have been able to do is image files that are either on a web > server or already in a FileLibrary. Can any kind soul please help me? Many > thanks... > > -- > View this message in context: http://forum.world.st/Noob-wants-to-render-dynamic-png-file-tp3672518p3672518.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by johnhwoods
Welcome! This is described here:
http://book.seaside.st/book/in-action/serving-files/images Lukas On Saturday, 16 July 2011, johnhwoods <[hidden email]> wrote: > Hi Guys, > > Very new to Seaside (<24h) but it looks fantastic. I'd like to serve a page > with a dynamically created .png file - a callback fires some code to > generate a .png, but I have no idea how to serve it back. All the image > serving I have been able to do is image files that are either on a web > server or already in a FileLibrary. Can any kind soul please help me? Many > thanks... > > -- > View this message in context: http://forum.world.st/Noob-wants-to-render-dynamic-png-file-tp3672518p3672518.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by jgfoster
Hi James, Lukas -
Thanks very much for the quick replies. I think the main problem is probably that I'm trying to run before I can walk, so I may not have been clear enough in my question - but the two replies, taken together, showed me what to do. James pointed me at this: This enabled me to put an anchor 'Get the .png' which, when clicked, returned the image. Not quite what I wanted, because I wanted it displayed on the page and not offered as a download when a link was clicked. But it did show me how to set up a MIME document. Lukas pointed me at this: Unfortunately I don't have WAImage>form: (is it Pharo-specific?) but I could combine this with James' help to give me this: ...where prev and next decrement/increment a counter which determines what bytes are served by getPngBytes. Hope I have done the right thing design-wise but it seems to work. Thanks again for your very useful and quick responses. John |
Free forum by Nabble | Edit this page |