[Newbies] Image manipulation
cdshaffer at acm.org
Tue Sep 19 18:48:24 UTC 2006
G M wrote:
> I'm a beginner who's trying to use Squeak to do some image
> manipulation at the back end. It's part of a Webapp for
> medical images (the Web part might be handled by Seaside). I really
> like Seaside, but I have not decided because I'm concerned about
> image manipulation in Squeak. So here's the issue:
> 1. I have not found a squeak package that does something
> similar to ImageMagick. If there's no such facility in Squeak,
> how can I "call" an external library such as ImageMagick
> from the Squeak image?
There is a Squeak package which may do what you want:
Otherwise you can use ImageMagick either by executing it's various
command line tools. For an example of running a command line app look
at the UnixProcess class side method called testRunCommand. It is
fairly straightforward to execute an external command from inside Squeak.
Finally if executing from the command line takes too long you might
consider building a simple C interface for the ImageMagick tools you
need and then calling that interface via FFI ("Foreign Function
Interace" -- call C functions from Squeak). It is certainly possible to
use the ImageMagick libraries directly from Squeak but writing a simple
wrapper usually makes it easier. There are lots of examples of FFI in
the Squeak image. Have a look at the Wiki page for more details (don't
know if it is up to date though):
Finally if FFI proves to be too slow you can go even deeper and write a
plugin. I don't have a good link for this...never done it myself.
Hope that helps!
More information about the Beginners