I was wondering if there is a way for sfs to launch some command line script after receiving data from a client?
I am assuming it would have to be a sfs extension doing the work, but i want to trigger imagemagick to edit a file after receiving certain commands from sfs.
Is there a way to do this?
Imagemagick
-
- Posts: 2
- Joined: 12 Apr 2011, 13:00
There's always a way
I would think though that this is a dangerous approach. How many users could possibly use the system at the same time? How many could possibly issue the ImageMagick spawning commands at the same time? Can ImageMagick be made to be headless (no display, no keyboard and mouse input)? Can ImageMagick be run in multiple instances on the same machine at a time? How many instances can run before the processor or memory pegs (also with SFS running)?
Instead, depending on the manipulations you need, there are plenty of Java based imaging libraries, I would look at using one of them and doing the work in the system. Keep in mind though the above concerns about multiple simultaneous image manipulations. For instance registering and stitching images is fairly intense, and you could easily blow out memory if more than one such operation was happening at a time.
If you really want to launch an external application though, Google the usage of Runtime.exec();
I would think though that this is a dangerous approach. How many users could possibly use the system at the same time? How many could possibly issue the ImageMagick spawning commands at the same time? Can ImageMagick be made to be headless (no display, no keyboard and mouse input)? Can ImageMagick be run in multiple instances on the same machine at a time? How many instances can run before the processor or memory pegs (also with SFS running)?
Instead, depending on the manipulations you need, there are plenty of Java based imaging libraries, I would look at using one of them and doing the work in the system. Keep in mind though the above concerns about multiple simultaneous image manipulations. For instance registering and stitching images is fairly intense, and you could easily blow out memory if more than one such operation was happening at a time.
If you really want to launch an external application though, Google the usage of Runtime.exec();
-
- Posts: 2
- Joined: 12 Apr 2011, 13:00
Who is online
Users browsing this forum: No registered users and 49 guests