📜  PHP |想象一下 getImageProperty()函数

📅  最后修改于: 2022-05-13 01:56:44.487000             🧑  作者: Mango

PHP |想象一下 getImageProperty()函数

Imagick::getImageProperty()函数是PHP中的一个内置函数,用于获取图像属性。图像属性和图像工件之间的主要区别在于属性是公共的,而工件是私有的。

句法:

string Imagick::getImageProperty( string $name )

参数:此函数接受单个参数$name ,其中包含属性名称。

返回值:此函数在成功时返回属性值。

下面的程序说明了PHP中的Imagick::getImageProperty()函数

程序:

setImageProperty("property_name", "property_value");
  
// Apply the getImageProperty() function
$property_name = $imagick->getImageProperty("property_name");
echo $property_name;
?>

输出:

property_value

参考: https://www. PHP.net/manual/en/imagick.getimageproperty。 PHP