Artificial intelligent assistant

画像上に、文字を縁取りしたテキストを描画したい ### **:** **:** $im = new Imagick(); $draw = new ImagickDraw(); $text=''; $im->annotateImage($draw, 0, 0, 0, $text);





$im = new Imagick('penguin.jpg');
$text='';

$draw = new ImagickDraw();
$draw->setFont('/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc');
$draw->setFontSize(32);
$draw->setStrokeAntialias(true);
$draw->setTextAntialias(true);

// lower
$draw->setStrokeColor('#fff'); // white
$draw->setStrokeWidth(5);
$im->annotateImage($draw, 10, 200, 0, $text);

// upper
$draw->setStrokeColor('#000'); // black
$draw->setStrokeWidth(1);
$im->annotateImage($draw, 10, 200, 0, $text);

$im->writeImage('annotate.jpg');


![annotate](

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy e5a0fc5ff8d700aa87fd5a5d08669ec7