Uh oh!
There was an error while loading. Please reload this page.
feat: rewrite ImageMagickHandler to rely solely on the PHP imagick extension - #9526
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
paulbalandan
commented
Apr 18, 2025
Would this fix #6149 ? Or performance is still somehow the same? |
michalsn
commented
Apr 18, 2025
Yes, it should be better. Using the imagick extension can actually be faster than CLI in many cases because we load and manipulate images entirely in memory. This may not be true only for very large files. It would be great if someone with a real-world use case could check this out. |
michalsn
commented
Apr 19, 2025
I ran some tests with a PNG image that was 6.7 MB in size. $iterator = new \CodeIgniter\Debug\Iterator();
$iterator->add('imagick', staticfunction () {
service('image', 'imagick')
->withFile(WRITEPATH . '/test/mypic.png')
->flip()
->resize(500, 500, true)
->text('Copyright 2025 My Photo Co', [
'color' => '#fff',
'opacity' => 0.5,
'withShadow' => true,
'hAlign' => 'center',
'vAlign' => 'bottom',
'fontSize' => 20,
'padding' => 20,
])
->save(WRITEPATH . '/test/image.jpg');
});
return$iterator->run(10);
|
6b1884a to
935b734CompareCo-authored-by: John Paul E. Balandan, CPA <paulbalandan@gmail.com>
935b734 to
7ae3d42Comparemichalsn
commented
Apr 22, 2025
Thank you for the review @paulbalandan, and everyone else for the feedback. |
ddevsr
commented
May 2, 2025
Btw, missing required |
Description
This PR rewrites
ImageMagickHandlerto rely solely on the PHPimagickextension.Since we required this extension from the beginning, there should be no problems for users.
Fixes#9512
Checklist: