函数名称: Imagick::getImageAttribute()
函数描述: 获取图像属性的值
适用版本: Imagick 3.0.0 及以上版本
用法:
public Imagick::getImageAttribute ( string $key [, string $value ] ) : string|bool
参数:
返回值:
示例:
// 创建Imagick对象
$image = new Imagick('image.jpg');
// 获取图像的属性值
$attributeValue = $image->getImageAttribute('attribute_key');
// 输出图像属性值
echo $attributeValue;
// 设置图像的属性值
$image->getImageAttribute('attribute_key', 'new_value');
注意事项:
更多信息: