Text Quality

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
paulswansea

Re: Text Quality

Post by paulswansea »

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;
?>
Post Reply