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:

filter_none

edit
close

play_arrow

link
brightness_4
code

<?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();
?>

chevron_right


Output:

Program 2:

filter_none

edit
close

play_arrow

link
brightness_4
code

<?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();
?>

chevron_right


Output:

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



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.