01.
<?
02.
header(
"Content-type: image/png"
);
03.
header(
"Expires: Wed, 31 May 2000 14:59:58 GMT"
);
04.
header(
"pragma: no-cache"
);
05.
header(
"Cache-control: no-cache"
);
06.
07.
08.
$canvas
=
new
Imagick();
09.
$canvas
->newImage(400, 600,
"#FFFFFF"
);
10.
11.
12.
$draw
=
new
ImagickDraw();
13.
14.
15.
$draw
->setFont(
'./ume-pgo4.ttf'
);
16.
17.
$draw
->setFontSize(24);
18.
19.
$txt
= print_r(
$canvas
->queryFontMetrics(
$draw
,
"日本語表示"
) , true );
20.
21.
22.
$draw
->annotation(0, 20,
"日本語表示\n{$txt}"
);
23.
24.
25.
$canvas
->drawImage(
$draw
);
26.
27.
28.
$canvas
->setImageFormat(
'png'
);
29.
30.
31.
print
$canvas
;
32.
33.
?>