<?php
$imagick
=
new
Imagick();
$imagick
->newImage(800, 250,
'white'
);
$draw
=
new
ImagickDraw();
$draw
->setFillColor(
'yellow'
);
$draw
->setStrokeColor(
'black'
);
$draw
->setStrokeWidth(1);
$draw
->pathStart();
$draw
->pathMoveToRelative(350, 20);
$draw
->pathLineToRelative(40, 60);
$draw
->pathLineToRelative(80, 20);
$draw
->pathLineToRelative(-80, 30);
$draw
->pathLineToRelative(30, 60);
$draw
->pathLineToRelative(-50, -20);
$draw
->pathLineToRelative(-50, 40);
$draw
->pathLineToRelative(10, -70);
$draw
->pathLineToRelative(-50, -10);
$draw
->pathLineToRelative(50, -30);
$draw
->pathLineToRelative(20, -80);
$draw
->pathFinish();
$imagick
->drawImage(
$draw
);
$imagick
->setImageFormat(
'png'
);
header(
"Content-Type: image/png"
);
echo
$imagick
->getImageBlob();
?>