Thursday, October 16, 2025
HomeLanguagesPHP | Imagick inverseFourierTransformImage() Function

PHP | Imagick inverseFourierTransformImage() Function

The Imagick::inverseFourierTransformImage() function is an inbuilt function in PHP which is used to implements the inverse discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair.

Syntax:

bool Imagick::inverseFourierTransformImage( imagickObject $imagick, float $complement )

Parameters: This function accepts two parameters as mentioned above and described below:

  • $imagick: It specifies the second image to combine with this one to form either the magnitude / phase or real / imaginary image pair.
  • $complement: It contains a boolean which if true, combine as magnitude / phase pair otherwise a real / imaginary image pair.

Return Value: This function returns TRUE on success.

Exceptions: This function throws ImagickException on error.

Below given programs illustrate the Imagick::inverseFourierTransformImage() function in PHP:

Program 1:




<?php
  
// Create a new Imagick object
$imagick1 = new Imagick(
  
$imagick2 = new Imagick(
  
$imagick1->inverseFourierTransformImage($imagick2, true);
  
// Display the image
header("Content-Type: image/png");
echo $imagick1->getImageBlob();
?>


Output:

Program 2:




<?php
  
// Create a new Imagick object
$imagick1 = new Imagick(
  
$imagick2 = new Imagick(
  
$imagick1->inverseFourierTransformImage($imagick2, false);
  
// Display the image
header("Content-Type: image/png");
echo $imagick1->getImageBlob();
?>


Output:

Reference: https://www.php.net/manual/en/imagick.inversefouriertransformimage.php

RELATED ARTICLES

Most Popular

Dominic
32361 POSTS0 COMMENTS
Milvus
88 POSTS0 COMMENTS
Nango Kala
6728 POSTS0 COMMENTS
Nicole Veronica
11892 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11953 POSTS0 COMMENTS
Shaida Kate Naidoo
6852 POSTS0 COMMENTS
Ted Musemwa
7113 POSTS0 COMMENTS
Thapelo Manthata
6805 POSTS0 COMMENTS
Umr Jansen
6801 POSTS0 COMMENTS