LTMagic/TDraw
Wrappers for ImageMagick for PHP for true object oriented scripting
This project has been discontinued (May 2021), but lives on at: https://sourceforge.net/projects/tmagic/ in a yet more powerful form.
Bring the full power of object oriented programming to PHP's Imagick.
LTMagic is a class to extend the IMagick class and TDraw extends the ImagickDraw class with the goal of simplifying repetitive code.
Instead of:
$draw->setFont ("Arial-bold");
$draw->setFontSize (24);
$draw->setTextAlignment (Imagick::ALIGN_CENTER);
$draw->annotation ($im_x - 45, $im_y - 33, $x_axis);
Do it in one line:
$draw->Tfont ("Arial-bold", 24)->Talign ("center")->Ttext ($im_x - 45, $im_y - 33, $x_axis);
LTImagic/TDraw also seeks to address some of the shortcomings of PHP's Imagick, such as verbose code, inconsistent returning of Imagick objects or booleans, uniting several steps into a single function, combining set/get functions.