Friday, November 21, 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
32405 POSTS0 COMMENTS
Milvus
97 POSTS0 COMMENTS
Nango Kala
6781 POSTS0 COMMENTS
Nicole Veronica
11928 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11997 POSTS0 COMMENTS
Shaida Kate Naidoo
6907 POSTS0 COMMENTS
Ted Musemwa
7166 POSTS0 COMMENTS
Thapelo Manthata
6862 POSTS0 COMMENTS
Umr Jansen
6847 POSTS0 COMMENTS