On 8/15/07, Gregory Maxwell <gmaxwell(a)gmail.com> wrote:
If someone gets as far as making a imagemagick wrapper
where you can
move sliders then hit submit and get a new image with the sliders in
effect, I'll gladly write the JS needed to update the screen on the
fly.
Architecture-wise I guess you're going to have something like this:
1. Copy source image to session folder/image1.jpg
2. User specifies what changes they want
3. Call imagemagick to generate image2.jpg
4. Display image2.jpg
5. If not done yet, go to 2. Or rollback if undo requested.
6. Save imagex.jpg "over" the original image (or to some new image
name), wiping the session images.
AJAX is pretty straight forward. You run a timer, or
hook an event via
Javascript, and when something has changed you fire off a http request
to get the new output and register chunk of JS to handle the reply.
The reply comes in, your handler then does something with it such as
replacing part of the page with it.
What if the triggering event is server-side? Eg, the image has
finished rendering, now show it? Though most of the image processing
will be pretty quick, I imagine.
Steve