Open In App

PHP | Imagick transverseImage() Function

Last Updated : 26 Aug, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report
The Imagick::transverseImage() function is an inbuilt function in PHP which is used to create a horizontal mirror image by reflecting the pixels around the y-axis. This function rotates the image by 270-degrees. Syntax:
bool Imagick::transverseImage( void )
Parameters: This function does not accept any parameter. Return Value: This function returns True on success. Original Image: Below program illustrate Imagick::transverseImage() function in PHP: Program: php
<?php

// require_once('path/vendor/autoload.php');
 
// Create an imagick object
 
$image = new Imagick(
'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png');
 
// Imagick function to transverse Image
 
$image->transverseImage();
    
header("Content-Type: image/jpg");

// Display the image
echo $image->getImageBlob();
?>
Output: Related Articles: Reference: http://php.net/manual/en/imagick.transverseimage.php

Next Article

Similar Reads