[Seaside] Trends and Graphics

Boris Popov popov at shaw.ca
Sat May 27 20:06:55 UTC 2006


Mike Hales wrote:
> I am going to be starting a small seaside project soon to provide a 
> limited web interface for our existing VW and Gemstone application.  One 
> thing that I want to do is provide basic trend functionality.  On google 
> trends I see that they generate a png file on the fly for their trends.  
> I don't need trends that continuously update so generating some sort of 
> image would work fine.  I know squeak has some libraries to do this sort 
> of thing but does anyone have suggestions for good starting point in 
> VisualWorks?  For our GUI based app we have custom views to handle all 
> of the trending.  Is there any code out there that could take a 
> GrapicsContext and drop it to a jpg for example that could be served up 
> through seaside?  Thanks for any pointers.
> 
> Mike
> 

I'd first generate your graph using graphics context on a pixmap, which 
can then be converted to a native image via #asImage, which you could 
then save as png/jpg/gif. As far as writers for these formats go, we 
wrote a quick and dirty interface to FreeImage which does all the 
reading/writing of many image formats for us, I'll have to see on Monday 
if I can throw it in the public, its really not rocket science there.

Cheers!

-Boris


More information about the Seaside mailing list