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
Using PHP, How to Insert Text Without Overwriting to the Beginning of a Text File
Add X Days to Date, Excluding Weekends
How to Get a List of MySQL Databases in PHP Using Pdo
Sharing PHP Session ($_Session) Across Multiple Domain
How to Send a File via Axios to Laravel
How to Replace Some Characters with Asterisks
Mysqli Query to Loop Through Array and Update Multiple Rows
Converting Human-Friendly Date to Milliseconds
Indented List to Multidimensional Array
Why Can't I Pass User Sessions Between Subdomains
How to Inject a Service in Another Service in Symfony
Set Quantity Minimum, Maximum and Step at Product Level in Woocommerce