|
Posted by Ask Josephsen on 12/07/06 12:50
Hi
I want to create an image with vertical text, but how do I handle
special chars like "æøå"? I'm using php version 4.4.2.
This is my code so far:
$string = "æøå";
$fh = 6;
$im = imagecreate ( 14, strlen($string)*$fh+2 );
$bg = imagecolorallocate ( $im, 255, 17, 255 );
$black = imagecolorallocate($im, 0, 0, 0);
for ( $j=strlen($string)*$fh, $i=0; $i<strlen($string); $i++, $j-=$fh )
imagecharup ( $im, 2, 0, $j, $string[$i], $black );
header('Content-type: image/png');
imagepng($im);
Thanx
Ask
[Back to original message]
|