Re: Text Quality
Posted: 2009-06-18T05:31:59-07:00
This is an alternative way of doing it, hope its ok
Code: Select all
<?php
$image_width = 800;
$image_height = 18;
$font = 'miso-light.ttf';
$text = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris lectus mi, mattis non, euismod vel, sagittis nec, ipsum.";
$im = new Imagick();
$im->setFont('/usr/share/fonts/truetype/' . $font);
$im->newPseudoImage( $image_width, $image_height, "caption:" . $text );
$im->setImageFormat( "png") ;
header( "Content-Type: image/png" );
echo $im;
?>