PHP 8.3.4 Released!

Imagick::setImageProperty

(PECL imagick 2, PECL imagick 3)

Imagick::setImageProperty画像のプロパティを設定する

説明

public Imagick::setImageProperty(string $name, string $value): bool

指定した名前のプロパティを画像に設定します。 このメソッドは、ImageMagick バージョン 6.3.2 以降で Imagick をコンパイルした場合に使用可能です。

パラメータ

name

value

戻り値

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

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

画像のプロパティを設定し、そして取得します。

<?php
$image
= new Imagick();
$image->newImage(300, 200, "black");

$image->setImageProperty('Exif:Make', 'Imagick');
echo
$image->getImageProperty('Exif:Make');
?>

参考

add a note

User Contributed Notes 1 note

up
9
Jocke Selin
5 years ago
Please be aware that only 'comment' values are written to the file if it's a JPEG. This means that any other data, such as GPS data or Exif data can be 'modified' but will not be written to the file. This might change in the future, but it hasn't change in 2 years.

For reference.
https://github.com/mkoppanen/imagick/issues/124
https://github.com/ImageMagick/ImageMagick/issues/55
To Top