Friday, September 19, 2025
HomeLanguagesPHP | Imagick transposeImage() Function

PHP | Imagick transposeImage() Function

The Imagick::transposeImage() function is an inbuilt function in PHP which is used to create a vertical mirror image. This function creates an image by reflecting the pixels around the central x-axis while rotating them 90-degrees.

Syntax:

bool Imagick::transposeImage( void )

Parameters: This function does not accepts any parameter.

Return Value: This function returns True on success.

Original Image:

Below program illustrate Imagick::transposeImage() function in PHP:
Program:




<?php
  
// require_once('path/vendor/autoload.php');
   
// Create an imagick object
   
$image = new Imagick(
   
// Imagick function to transpose Image
   
$image->transposeImage();
      
header("Content-Type: image/jpg");
  
// Display the image
echo $image->getImageBlob();
?>


Output:

Related Articles:

Reference: http://php.net/manual/en/imagick.transposeimage.php

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
RELATED ARTICLES

Most Popular

Dominic
32303 POSTS0 COMMENTS
Milvus
84 POSTS0 COMMENTS
Nango Kala
6666 POSTS0 COMMENTS
Nicole Veronica
11841 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11898 POSTS0 COMMENTS
Shaida Kate Naidoo
6781 POSTS0 COMMENTS
Ted Musemwa
7058 POSTS0 COMMENTS
Thapelo Manthata
6739 POSTS0 COMMENTS
Umr Jansen
6745 POSTS0 COMMENTS