Friday, October 10, 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
32349 POSTS0 COMMENTS
Milvus
87 POSTS0 COMMENTS
Nango Kala
6715 POSTS0 COMMENTS
Nicole Veronica
11878 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11941 POSTS0 COMMENTS
Shaida Kate Naidoo
6837 POSTS0 COMMENTS
Ted Musemwa
7097 POSTS0 COMMENTS
Thapelo Manthata
6792 POSTS0 COMMENTS
Umr Jansen
6791 POSTS0 COMMENTS