PHP | Imagick getImageProperties() Function Last Updated : 24 Feb, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report 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: $pattern: It specifies pattern for property names. Default value is * which returns all the properties.$includes_values: It specifies whether to return only property names. Its default values is TRUE. If FALSE then only property names will be returned. Return Value: This function returns an array containing the image properties or just property names.Below programs illustrate the Imagick::getImageProperties() 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 Properties $imagick->setImageProperty('property1', 'value1'); $imagick->setImageProperty('property2', 'value2'); $imagick->setImageProperty('hello', 'world'); // Get the Image Profiles without values starting from "pro" $properties = $imagick->getImageProperties("pro*", false); print("<pre>".print_r($properties, true)."</pre>"); ?> Output: Array ( [0] => property1 [1] => property2 ) 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 Properties $imagick->setImageProperty('property1', 'value1'); $imagick->setImageProperty('property2', 'value2'); // Get the Image Profiles $properties = $imagick->getImageProperties("*"); print("<pre>".print_r($properties, true)."</pre>"); ?> Output: Array ( [date:create] => 2019-11-21T22:32:52+05:00 [date:modify] => 2019-11-21T22:32:52+05:00 [png:cHRM] => chunk was found (see Chromaticity, above) [png:gAMMA] => gamma=0.45455 (See Gamma, above) [png:IHDR.bit-depth-orig] => 8 [png:IHDR.bit_depth] => 8 [png:IHDR.color-type-orig] => 6 [png:IHDR.color_type] => 6 (RGBA) [png:IHDR.interlace_method] => 0 (Not interlaced) [png:IHDR.width, height] => 667, 184 [png:pHYs] => x_res=3780, y_res=3780, units=1 [png:sRGB] => intent=0 (Perceptual Intent) [png:text] => 1 tEXt/zTXt/iTXt chunks were found [property1] => value1 [property2] => value2 [Software] => Adobe ImageReady ) Reference: https://www.php.net/manual/en/imagick.getimageproperties.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 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 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 | Imagick getImageProfile() Function 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 retur 1 min read PHP | Imagick getImageType() Function The Imagick::getImageType() function is an inbuilt function in PHP which is used to get the potential image type. Syntax: int Imagick::getImageType( void ) Parameters: This function doesnât accepts any parameter. Return Value: This function returns an integer value corresponding to one of IMGTYPE co 1 min read PHP | Imagick getImageRegion() Function The Imagick::getImageRegion() function is an inbuilt function in PHP which is used to extracts a region of the image. Syntax: Imagick Imagick::getImageRegion( int $width, int $height, int $x, int $y ) Parameters:This function accepts four parameters as mentioned above and described below: $width: It 1 min read PHP | Imagick getImageSize() Function The Imagick::getImageSize() function is an inbuilt function in PHP which is used to get the image length in bytes. Syntax: int Imagick::getImageSize( void ) Parameters: This function doesnât accepts any parameter. Return Value: This function returns an integer value containing the current image size 1 min read Like