Jump to content

Archived

This topic is now archived and is closed to further replies.

Jak

Best way to access image magick

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

Share this post


Link to post
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!

Share this post


Link to post
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?

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

×

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.