Results 1 to 13 of 13

Thread: imagemagick

  1. #1
    Join Date
    Jan 2002
    Location
    UK
    Posts
    632

    imagemagick

    Hi,

    I just installed imagemagick on the server, but want to know how do I use it ?

    If anyone know of any site for me to get a tutorial from or info on it etc... please let me know

    Regards,
    Garry

  2. #2
    Join Date
    Jan 2003
    Location
    Lake Arrowhead, CA
    Posts
    789
    Did you consider possibly reading any of the copious included documentation?

    Just look at the ImageMagick.html file in the directory you extracted it into and click the links. Almost every function is quite well documented.
    http://www.srohosting.com
    Stability, redundancy and peace of mind

  3. #3
    Join Date
    Feb 2003
    Location
    Ohio, USA
    Posts
    120
    You can use it with photo gallery scripts. I believe Gallery supports ImageMagick.

    http://gallery.menalto.com/

  4. #4
    Join Date
    Jan 2002
    Location
    UK
    Posts
    632
    Hi,

    Originally posted by SROHost
    Did you consider possibly reading any of the copious included documentation?

    Just look at the ImageMagick.html file in the directory you extracted it into and click the links. Almost every function is quite well documented.
    I didn't know that file was there, I just followed a step by step how to install it via ssh, I did got to the site and had quick look and couldn't see anything, thank you very much for point on the ImageMagick.html it very helpful

    Regards,
    Garry

  5. #5
    Join Date
    Jan 2003
    Location
    Lake Arrowhead, CA
    Posts
    789
    NP

    I make a habit of unzipping everything new on a local system and poking around a bit before putting it on a server.

    ImageMagick is nice, but I'd suggest a dedicated or SMP machine if you plan on using the more CPU intensive functions on large files. I have a server which uses it extensively with web clients (fortunately only on small files) and I had to create an sql "process que" to keep track of and limit the number of clients concurrently using image processing functions to avoid tying up the machine.
    http://www.srohosting.com
    Stability, redundancy and peace of mind

  6. #6
    Join Date
    Sep 2002
    Posts
    46
    Hi SROHost,

    Can you give me any clues as to how you acheived this 'process queue'? I'm implementing a similar system and having some troubles.

    Cheers,
    Russ

  7. #7
    Join Date
    Jan 2003
    Location
    Lake Arrowhead, CA
    Posts
    789
    Sorry, but details on how to do this will depend on your particular requirements, what language, database, etc. you're using and are far more applicable to the Programming Discussion forum. Without getting into code (which I'd end up posting, then not have time to debug/help you with), my process que works roughly like this:
    • Database table has fields UserID, Action, Priority and TimeStamp.
    • Script assigns clients a priority (or "weight") based on their account type.
    • Script averages priorities of currently running imaging functions and only permits a new client if they have a higher priority than those already running.
    • If the user is permitted, then 1) They're added to the process que, 2) the imaging function is performed, and finally 3) they're removed from the que.
    • Script checks TimeStamp and kills old entries left over when a browser crashes, the server is restarted, etc. during an imaging function (before a user is removed from the que).
    http://www.srohosting.com
    Stability, redundancy and peace of mind

  8. #8
    Join Date
    Sep 2002
    Posts
    46
    Hi,

    Thanks for the reply. Don't worry, I'm an OK programmer, I was just more interested in the methodology of such a procedure.

    I understand the principle of having a table with a queue of activities/commands to execute. What I can't work out is how to actually execute the commands in the queue.

    What I mean is, say a user initiates a command, doesn't have priority, and is placed in a queue. What trigger mechanism on the server actually processes the queue? Like I said, the only method I could think of was a cron job but it seems quite heavy handed.

    Actually, as I'm typing this, a vague idea is forming:

    - The user initiates a request to perform whatever command
    - User's request is added to the queue
    - Via a meta-refresh or whatever, the user's browser keeps polling a script to see where it is in the queue
    - And finally, once they are first, the command is executed

    Does something like the above sound reasonable?

    Cheers for the advice again

    Russ

  9. #9
    Join Date
    Jan 2003
    Location
    Lake Arrowhead, CA
    Posts
    789
    Hehe... what I described isn't an queue for waiting users at all, it's just a simple list of current users that tells everyone who can't get in to "go away and try again later"

    What you described would work, but it's (IMO) wasting the user's time to leave a browser "stuck in a loop" waiting, which is why I didn't go that way. Better yet would be to go with a persistent cron job in combination with database calls on every page load.

    - The user's job is added to the queue, then they're left to do whatever they like.

    - You add job status checks via a single database call made when they load any of their pages.

    - The cron runs once per minute (add delays to loop every X seconds). It checks the db for pending jobs and will:

    1) Execute jobs when ready.
    2) Remove them from the queue
    3) Notify the user with a "done" icon.

    The notification icon could be handled by moving jobs from the queue to a "finished job" table or just change a "job status" flag in the same queue table to "complete". If the queue is checked every time they load a page, the user will see a "job status" icon if jobs are pending or finished. You can clear it as soon as the user clicks the icon to open their "pending jobs" page and sees the completed job.

    That make sense?
    http://www.srohosting.com
    Stability, redundancy and peace of mind

  10. #10
    Join Date
    Sep 2002
    Posts
    46

    Post

    Some interesting ideas there. Thanks for your input, given me much food for thought

    Russ

  11. #11
    Join Date
    Apr 2002
    Location
    AU
    Posts
    1,049
    gooooooooogle is a great resource

  12. #12
    Join Date
    Sep 2002
    Posts
    46
    Yes... yes it is!

  13. #13
    Join Date
    Apr 2002
    Location
    AU
    Posts
    1,049

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •