Jump to content

Best way to access image magick


Jak

Recommended Posts

Hi,
I was just wondering if there was a "best practice" when it comes to using ImageMagick through PHP. Ive been using MagickWand on my local server, but my hosts dont support it, so i was wondering what the best alternative is really. Is there a standard class that everyone uses, or does everyone just write their own class / functions that directly access exec()?

Thanks,
Jack
Link to comment
Share on other sites

It depends on the server type you will be running under. While on Linux any of the PHP [b]Program Execution[/b] functions work great, on Windows I tend to favor COM based program execution, because I can control STDIN, STDOUT and STDERR, which is great when running intense image manipulation functions in ImageMagick or any of program where you need real time forking, (running multi processes concurrently) without having to wait within your script, on each process. Sure it not really forking, but it as close as you will get in a windows scripting environment.


me!
Link to comment
Share on other sites

Hmmm, thats kinda all a bit over my head, all i know is im running windows to test and linux on the production server. So would you reccomend me writing my own class, or are there good ones out there that take care of all the usuall requirements?

Cheers,
Jack

P.S. Did you have any luck with that imap thing with the UIDLs?
Link to comment
Share on other sites

Hi Jak

I would say to create your own. The reason why is because the ones that I have seen are just centered on certain functions within ImageMagick so they will be very limited. By limited I mean they do a set task, like make thumbnails with water maker of other tasks associated with the thumbnail class. So trying to fit that into your project may not be best because you might not need that functionality!

One class I use a lot is Pear Image_3D but like all the other classes it centered on rendering, in this case 3D rendering, not on giving a common interface to access ImageMagick functions! One special note, I noticed if you download the Perl package of ImageMagick, you will have a lot of examples that are easy to convert from Perl to PHP, way more examples than that are in the PHP package. If you do that and need help with converting any, just ask, I'll be glad to help you.


me!
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.