Using ImageMagick with PHP

There is a PHP mod­ule for Imagemag­ick, called imag­ick, sort of like the one for GD.

Fol­low­ing is some sim­ple code that has worked for me:

if(!extension_loaded('imagick')) { dl(''); }
$handle = imagick_create();
"primitive"     =>  "text 10,14 hello",
"pointsize"     =>  16,
"antialias"     =>  1,
"stroke"        =>  "#000000",
"font"          =>  "arial.ttf"
$handle = imagick_copy_rotate ($handle, 270);
header("Content-type: image/png");
  • superD

    would it be pos­si­ble that you may make it a bit more spe­cific for the non-programmers??
    such as "save as" and the next next step…etc??
    if it's pos­si­ble would be great, love to use it on my site. Thanks!

  • Vince

    There are more in-depth exam­ples about how to use the IMAGICK PHP exten­sion here:

    The Samples/ direc­tory con­tains about 30 exam­ples on how you can use IMAGICK


  • Ben

    I think you are right. One neat thing, I\'d have never pre­dicted with the inter­net, is that the sites are stay­ing around, so that peo­ple can find them, read them and learn from them. The worst thing about the .edu inter­net was data rot (a form of link rot) where resources and knowl­edge went into the vapor every semester.

  • blub

    But what good are web­sites and ref­er­ences, if the soft­ware in ques­tion is not being actively devel­oped. The imag­ick modul for exam­ple has so many bugs and glitches, and it seems that no one is tak­ing care of it. So I wish some­one would update all those web­sites, instead of them still being there, point­ing to the same old (out­dated) information.

  • Pingback: Imagemagick / apache / php - openSUSE Forums()

  • Webagen­tur

    Thank you, this lit­tle tut has me very helped.

  • Pingback: links for 2010-01-20 « ueXpected()

  • mayank

    how to install it on a i have to ask them to install it for me