« Imagick::combineImages
Imagick::compareImageChannels »

Imagick::commentImage

(PECL imagick 2, PECL imagick 3)

Imagick::commentImage — コメントを画像に追加する

説明

public function Imagick::commentImage(string $comment): bool

コメントを画像に追加します。

パラメータ

comment

追加するコメント。

戻り値

成功した場合に true を返します。

エラー / 例外

エラー時に ImagickException をスローします。

例

例1 Imagick::commentImage() の使用法

画像にコメントを追加し、そのコメントを取得します。

<?php

/* 新しい Imagick オブジェクトを作成します */
$im = new imagick();

/* 空の画像を作成します */
$im->newImage(100, 100, new ImagickPixel("red"));

/* コメントをその画像に追加します */
$im->commentImage("Hello World!");

/* コメントを表示します */
echo $im->getImageProperty("comment");

?>

関連キーワード:
コメント   Imagick   画像   commentImage   imagick   comment   combineImages   compareImageChannels   成功   ImagickException   newImage   ImagickPixel   Hello   World   getImageProperty
関連する関数・ページ:
imagick.stripimage   language.basic-syntax.comments   gmagick.commentimage   imagickdraw.comment   imagick.addimage   imagick.tostring