PHP | Imagick getImageOrientation() Function Last Updated : 28 Nov, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::getImageOrientation() function is an inbuilt function in PHP which is used to get the image orientation. Syntax: int Imagick::getImageOrientation( void ) Parameters: This function doesn't accept any parameter. Return Value: This function returns an integer value containing one of ORIENTATION constants. List of ORIENTATION constants are given below: imagick::ORIENTATION_UNDEFINED (0) imagick::ORIENTATION_TOPLEFT (1) imagick::ORIENTATION_TOPRIGHT (2) imagick::ORIENTATION_BOTTOMRIGHT (3) imagick::ORIENTATION_BOTTOMLEFT (4) imagick::ORIENTATION_LEFTTOP (5) imagick::ORIENTATION_RIGHTTOP (6) imagick::ORIENTATION_RIGHTBOTTOM (7) imagick::ORIENTATION_LEFTBOTTOM (8) Exceptions: This function throws ImagickException on error. Below programs illustrate the Imagick::getImageOrientation() 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'); // Get the Orientation $orientation = $imagick->getImageOrientation(); echo $orientation; ?> Output: 0 // Which corresponds to imagick::ORIENTATION_UNDEFINED. Program 2: php <?php // Create a new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Set the Orientation $imagick->setImageOrientation(imagick::ORIENTATION_TOPRIGHT); // Get the Orientation $orientation = $imagick->getImageOrientation(); echo $orientation; ?> Output: 2 Reference: https://www.php.net/manual/en/imagick.getimageorientation.php Comment More infoAdvertise with us Next Article PHP | Imagick getImageOrientation() Function gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Imagick getImageInterations() Function The Imagick::getImageIterations() function is an inbuilt function in PHP which is used to get the image iterations. The iteration means how many times the frames should repeat themselves. Syntax: int Imagick::getImageIterations( void ) Parameters: This function doesn't accepts any parameter. Return 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 getImageResolution() Function The Imagick::getImageResolution() function is an inbuilt function in PHP which is used to get the resolution of an image object. Syntax: bool Imagick::getImageResolution( void) Parameters: This function does not accept any parameter. Return Value: This function returns the resolution as an array. Be 2 min read PHP | Imagick getImageDistortion() Function The Imagick::getImageDistortion() function is an inbuilt function in PHP which is used to compare an image with reconstructed image and returns the specified distortion metric. Syntax: float Imagick::getImageDistortion(Imagick $reference, int $metric) Parameters: This function accepts two parameters 2 min read PHP | Imagick getImageFormat() Function The Imagick::getImageFormat() function is an inbuilt function in PHP which is used to get the format of a particular image in a sequence Syntax:  string Imagick::getImageFormat( void ) Parameters: This function does not accepts any parameter. Return Value: This function returns a string of the imag 1 min read PHP | Imagick getImageCompression() Function The Imagick::getImageCompression() function is an inbuilt function in PHP which is used to get the current image's compression type. Syntax: int Imagick::getImageCompression( void ) Parameters: This function doesn't accepts any parameter. Return Value: This function returns an integer value which co 1 min read PHP | Imagick getImageArtifact() Function The Imagick::getImageArtifact() function is an inbuilt function in PHP which is used to get the image artifact value associated with a artifact name. The main difference between image properties and image artifacts is that the properties are public whereas artifacts are private. Syntax: bool Imagick 1 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 | Gmagick getimageresolution() Function The Gmagick::getimageresolution() function is an inbuilt function in PHP which is used to get the resolution of an image object. Syntax: array Gmagick::getimageresolution( void ) Parameters: This function does not accept any parameter. Return Value: This function returns the resolution as an array. 2 min read PHP | Imagick getImageSignature() Function The Imagick::getImageSignature() function is an inbuilt function in PHP which is used to generate an SHA-256 message digest for an image. Syntax: string Imagick::getImageSignature( void ) Parameters: This function does not accept any parameter. Return Value: This function returns a string of SHA-256 1 min read Like