Open In App

PHP | Imagick deleteImageArtifact() Function

Improve
Improve
Like Article
Like
Save
Share
Report

The Imagick::deleteImageArtifact() function is an inbuilt function in PHP which is used to delete the image artifact. The main difference between image properties and image artifacts is that properties are public whereas artifacts are private.

Syntax:

bool Imagick::deleteImageArtifact( string $artifact )

Parameters: This function accepts a single parameter $artifact which holds the name of artifact.

Return Value: This function returns TRUE on success.

Errors/Exceptions: This function throws ImagickException on error.

Below program illustrates the Imagick::deleteImageArtifact() function in PHP:

Program:




<?php
  
// Create a new Imagick object
$imagick = new Imagick(
  
// Apply the setImageArtifact() function to create a artifact
$imagick->setImageArtifact("artifact_name", "artifact_value");
  
// Apply the deleteImageArtifact() function to delete a artifact
$imagick->deleteImageArtifact("artifact_name");
  
?>


Output:

A Database Error Occurred

Reference: https://www.php.net/manual/en/imagick.getimageartifact.php


Last Updated : 16 Oct, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads