Hi,
I'd like to be able to create an dynamically on the server. I understand that Gemstone as a headless smalltalk doesn't have graphic classes. Has anyone worked round this issue? One thought I had was to find a service that converted an html 5.0 page (canvas tag) into an image. Does anyone know of such a service or any other ideas would be gratefully received
Thanks Nick
|
Nick Ager wrote:
> Hi, > > I'd like to be able to create an dynamically on the server. I understand > that Gemstone as a headless smalltalk doesn't have graphic classes. Has > anyone worked round this issue? > One thought I had was to find a service that converted an html 5.0 page > (canvas tag) into an image. Does anyone know of such a service or any > other ideas would be gratefully received > > Thanks > > Nick It seems that some folks have used image processing programs (the name escapes me at the moment) for creating images, and others have discussed using Pharo as an image server via HTTP ... Perhaps, others remember more details which would give me some better terms to use for searching my mail archive:) Dale |
Dale, It seems that some folks have used image processing programs (the name escapes me at the moment) for creating images, and others have discussed using Pharo as an image server via HTTP ... Thanks for the tip. I searched for ImageMagick in the archives. The options I've read about so far are: * script ImageMagick using CGI, then make http requests via Gemstone or via the clients browser for the images.
* use the image manipulation in Pharo/Squeak and call from Gemstone via http * call an OS process from Gemstone to ImageMagick to create the images. That's given me some good ideas to ponder consider.
Thanks Nick |
On 9/2/2010 10:41 AM, Nick Ager wrote:
> * call an OS process from Gemstone to ImageMagick to create the images. If you find it helpful, I was doing something like this with ImageMagick to re-size user uploaded images using something similar to this... scaleImage: aFileModel width: aWidth height: aHeight | form tempFileName tempFile tempDir newFile baseDir | tempDir := ServerFileDirectory on: '/tmp' . tempFileName := UUID new asString. tempFile := tempDir forceNewFileNamed: tempFileName. [ tempFile nextPutAll: aFileModel contents asString ] ensure: [ tempFile close ]. System performOnServer: ('convert /tmp/{1} -resize {2}x{3} /tmp/{1}.new' format: {tempFileName. aWidth. aHeight }). baseDir := self baseDirectoryForImages. ^ [ newFile := MAExternalFileModel new filename: 'thumb.jpg'; mimetype: 'image/jpeg'; contents: (tempDir fileNamed: tempFileName, '.new') contentsOfEntireFile. System performOnServer: 'chmod +r ', baseDir, '/', newFile location first. System performOnServer: 'chmod +r ', baseDir, '/', newFile location first, '/', newFile location second. newFile ] ensure: [ tempDir deleteFileNamed: tempFileName. tempDir deleteFileNamed: tempFileName, '.new'] Ramon Leon http://onsmalltalk.com |
In reply to this post by Nick
On 2 sep 2010, at 15:03, Nick Ager wrote: > I'd like to be able to create an dynamically on the server. I understand that Gemstone as a headless smalltalk doesn't have graphic classes. Has anyone worked round this issue? > One thought I had was to find a service that converted an html 5.0 page (canvas tag) into an image. Does anyone know of such a service or any other ideas would be gratefully receive There's the RaphaelJs package by Gerhard Obermann: http://www.squeaksource.com/Raphael It can do pretty interesting stuff, though IE still provides some headaches. Stephan visualisatie.png (10K) Download Attachment |
Thanks all for the ideas - really helpful and given me a some good leads to explore further.
On 2 September 2010 21:55, Stephan Eggermont <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |