Issues Porting PHP/Gd Wrapper to Imagick

Compatible issues with Imagick Transparent?

Have you tried none rather than transparent?

Another answer from Stackoverflow: Setting an alpha channel when constructing an ImagickPixel

Imagick Wrong JPEG library version

Never mind, I found the solution. I had compiled a later version of libjpeg at some point. I deleted /usr/local/lib/libjpeg*, reinstalled libjpeg and libjpeg-devel from yum, ran ldconfig, recompiled php and everything worked fine!

Should I use a PHP extension for ImageMagick or just use PHP's Exec() function to run the terminal commands?

You would benefit a lot using the PHP extensions instead of using exec or similar functions. Built in extensions will be faster and use less memory as you will not have to spawn new processes and read the output back. The image objects will be directly available in PHP instead of having to read file output, which should make the images easier to work with.

If you have a busy site, creating lots of processes to edit images may start to slow things down and consume additional memory.



Related Topics



Leave a reply



Submit