ext-imagick are available on most shared hosting (on CPanel, there is a section page for modules). php-imagick on VPS (or Linux in general) is available on package manager or pecl.
I suggest to add lines of code to check if this extension loaded, then use it. If not loaded then do exec(). Something like this:
}elseif(extension_loaded('imagick')){// do crazy stuff with Imagick
}else{// ImageMagick
// convert via exec()
Manual page: https://www.php.net/manual/en/book.imagick.php
`ext-imagick` are available on most shared hosting (on CPanel, there is a section page for modules). `php-imagick` on VPS (or Linux in general) is available on package manager or pecl.
I suggest to add lines of code to check if this extension loaded, then use it. If not loaded then do `exec()`. Something like this:
```php
} else if (extension_loaded('imagick')) {
// do crazy stuff with Imagick
} else { // ImageMagick
// convert via exec()
```
tslocum
changed title from Using native php-imagick extension instead ImageMagick (`convert` via `exec()`) to Support ImageMagick PHP extension2 months ago
Manual page: https://www.php.net/manual/en/book.imagick.php
ext-imagick
are available on most shared hosting (on CPanel, there is a section page for modules).php-imagick
on VPS (or Linux in general) is available on package manager or pecl.I suggest to add lines of code to check if this extension loaded, then use it. If not loaded then do
exec()
. Something like this:Using native php-imagick extension instead ImageMagick (`convert` via `exec()`)to Support ImageMagick PHP extension 2 months ago