PHP | Imagick setImageProfile() Function Last Updated : 26 Nov, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::setImageProfile() function is an inbuilt function in PHP which is used to set the named profile to the Imagick object. Syntax: bool Imagick::setImageProfile( string $name, string $profile ) Parameters:This function accepts two parameters as mentioned above and described below: $name: It specifies the name of the profile. $profile: It specifies the value of the profile. Return Value: This function returns TRUE on success. Errors/Exceptions: This function throws ImagickException on error. Below programs illustrate the Imagick::setImageProfile() function in PHP: Program 1: php <?php // Create a new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Set the Image Profile $imagick->setImageProfile('color', 'cyan'); // Use the Image Profile $imagick->setImageBackgroundColor($imagick->getImageProfile('color')); $imagick->setImageAlphaChannel(Imagick::ALPHACHANNEL_SHAPE); // Display the image header("Content-Type: image/png"); echo $imagick->getImageBlob(); ?> Output: Program 2: php <?php // Create a new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Set the Image Profile $imagick->setImageProfile('borderColor', 'green'); // Use the Image Profile $imagick->borderImage($imagick->getImageProfile('borderColor'), 1, 1); // Display the image header("Content-Type: image/png"); echo $imagick->getImageBlob(); ?> Output: Reference: https://www.php.net/manual/en/imagick.setimageprofile.php Comment More infoAdvertise with us Next Article PHP | Imagick setImageProfile() Function gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Imagick removeImageProfile() Function The Imagick::removeImageProfile() function is an inbuilt function in PHP which is used to remove the named image profile. Syntax: string Imagick::removeImageProfile( string $name ) Parameters: This function accepts a single parameter $name which holds the name of the profile. Return Value: This func 1 min read PHP | Imagick setImageFilename() Function The Imagick::setImageFilename() function is an inbuilt function in PHP which is used to set the filename of a particular image. Syntax: bool Imagick::setImageFilename( string $filename ) Parameters: This function accepts single parameter $filename which holds a string that represent the filename. Re 1 min read PHP | Imagick setImageProperty() Function The Imagick::setImageProperty() function is an inbuilt function in PHP which is used to set the image property. The main difference between image properties and image artifacts is that the properties are public whereas artifacts are private. Syntax: bool Imagick::setImageProperty( string $name, stri 1 min read PHP | Imagick setImagePage() Function The Imagick::setImagePage() function is an inbuilt function in PHP which is used to set the image page geometry. Syntax: bool Imagick::setImagePage(int $width, int $height, int $x, int $y ) Parameters: This function accepts four parameters as mentioned above and described below: $width: It specifies 1 min read PHP | Imagick setImageType() Function The Imagick::setImageType() function is an inbuilt function in PHP which is used to set the image type.Syntax:Â Â bool Imagick::setImageType( int $image_type ) Parameters: This function accepts a single parameter $image_type which contains an integer value corresponding to one of IMGTYPE constants. W 1 min read PHP | Imagick readImageFile() Function The Imagick::readImageFile() function is an inbuilt function in PHP which is used to read image from open filehandle. Syntax: bool Imagick::readImageFile( resource $filename, string $fileName = NULL ) Parameters:This function accepts two parameters as mentioned above and described below: $filehandle 1 min read PHP | Imagick setImageDispose() Function The Imagick::setImageDispose() function is an inbuilt function in PHP which is used to sets the image disposal method. Syntax: bool Imagick::setImageDispose( $dispose ) Parameters: This function accepts single parameter $dispose which specifies the dispose Imagick object to be set. Return Value: Thi 2 min read PHP | Imagick setImageCompose() Function The Imagick::setImageCompose() function is an inbuilt function in PHP which is used to set the composite operator associated with the image. This function is used to specify how to composite the image thumbnail when using the Imagick::montageImage() method. Syntax: bool Imagick::setImageCompose( int 1 min read PHP | Imagick writeImageFile() Function The Imagick::writeImageFile() function is an inbuilt function in PHP which is used to write the image sequence to an open filehandle. The handle must be opened with fopen. Syntax: bool Imagick::writeImageFile( resource $filehandle, string $format ) Parameters: This function accepts two parameters as 2 min read Like