PHP | Imagick getImageProfile() Function Last Updated : 26 Nov, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::getImageProfile() function is an inbuilt function in PHP which is used to return the named image profile. Syntax: string Imagick::getImageProfile( string $name ) Parameters: This function accepts a single parameter $name which holds the name of profile. Return Value: This function returns a string containing the image profile. Errors/Exceptions: This function throws ImagickException on error. Below programs illustrate the Imagick::getImageProfile() 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('profile_name', 'profile_data'); // Get the Image Profile $profile = $imagick->getImageProfile('profile_name'); echo $profile; ?> Output: profile_data 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('color', 'red'); // 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: Reference: https://www.php.net/manual/en/imagick.getimageprofile.php Comment More infoAdvertise with us Next Article PHP | Imagick getImageProfile() Function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Imagick getImageProfiles() Function The Imagick::getImageProfiles() function is an inbuilt function in PHP which is used to get the image profiles. Syntax: array Imagick::getImageProfiles( string $pattern = "*", bool $include_values = TRUE ) Parameters: This function accepts two parameters as mentioned above and described below: $patt 2 min read PHP | Gmagick getimageprofile() Function The Gmagick::getimageprofile() function is an inbuilt function in PHP which is used to get the named image profile. Syntax: string Gmagick::getimageprofile( string $name ) Parameters: This function accepts a single parameter $name which holds the name of the profile. Return Value: This function retu 1 min read PHP | Imagick getImageProperties() Function The Imagick::getImageProperties() function is an inbuilt function in PHP which is used to get the image properties.Syntax:Â Â array Imagick::getImageProperties( string $pattern, string $includes_values ) Parameters: This function accepts two parameters as mentioned above and described below:Â Â $patte 2 min read PHP | Imagick getImageFilename() Function The Imagick::getImageFilename() function is an inbuilt function in PHP which is used to get the filename of a particular image in a sequence. The difference between getImageFilename() and getFilename() is that the former can accept local image files and give its name along with the absolute address. 1 min read PHP | Imagick getImageProperty() Function The Imagick::getImageProperty() function is an inbuilt function in PHP which is used to get the image property. The main difference between image properties and image artifacts is that the properties are public whereas artifacts are private. Syntax: string Imagick::getImageProperty( string $name ) P 1 min read Like