Using ImageMagick with PHP
There is a PHP module for Imagemagick, called imagick, sort of like the one for GD.
Following is some simple code that has worked for me:
if(!extension_loaded('imagick')) { dl('imagick.so'); } $handle = imagick_create(); imagick_set_attribute($handle,array("quality"=>1,"magick"=>"png")); imagick_set_attribute($handle,"size","98x20"); imagick_read($handle,"xc:#cccccc"); imagick_annotate($handle,array( "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"); imagick_dump($handle,"png"); |
Pingback: Imagemagick / apache / php - openSUSE Forums()
Pingback: links for 2010-01-20 « ueXpected()