php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69903 function forwardFourierTransformimage returns error
Submitted: 2015-06-22 17:54 UTC Modified: 2015-12-05 14:08 UTC
Votes:4
Avg. Score:4.2 ± 0.8
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: lee dot traynor at skeptic dot de Assigned: danack (profile)
Status: Not a bug Package: imagick (PECL)
PHP Version: 5.5.26 OS: Windows XP
Private report: No CVE-ID: None
 [2015-06-22 17:54 UTC] lee dot traynor at skeptic dot de
Description:
------------
---
From manual page: http://www.php.net/imagick.forwardfouriertransformimage
---
Calling this function results in:

PHP Fatal error:  Call to undefined method Imagick::forwardFourierTransformimage()

Test script:
---------------
$im = new Imagick ("compass_model.png");
$im->forwardFourierTransformimage (true);
$im->writeImages ("fourier_test.png", false);


Expected result:
----------------
Saving of magnitude/phase diagrams as "fourier_test-00.png", "fourier_test-01.png"

Actual result:
--------------
Fatal error

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-23 16:20 UTC] danack@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: danack
 [2015-06-23 16:20 UTC] danack@php.net
The function is only available if ImageMagick was compiled on a system with the FFTW library. http://www.fftw.org/

I need to add this to the documentation.
 [2015-06-23 16:29 UTC] lee dot traynor at skeptic dot de
The error is: Call to undefined method

so it won't even work with imagemagick compiled with fftw support. Please check that this is indeed the case before adding misleading comments to the documentation.
 [2015-06-23 21:32 UTC] danack@php.net
Thank you for the feedback. Here is an example of it working: http://phpimagick.com/Imagick/forwardFourierTransformImage

I've double-checked and the method Imagick::forwardfouriertransformimage is definitely not compiled into the Imagick class, if the functions provided by FFTW are not available through ImageMagick.

It is a case that the method is not available, rather than being available and just not working if the FFTW stuff isn't available.
 [2015-12-05 14:08 UTC] danack@php.net
-Status: Assigned +Status: Not a bug
 [2015-12-05 14:08 UTC] danack@php.net
I should have said, checking for whether the method is available before hand is the appropriate thing to do if you are unsure whether the version of Imagick installed is going to have the fourier functions installed or not.

$im = new Imagick ("compass_model.png");
if (method_exists($im, 'forwardFourierTransformimage') == false) {
	throw new Exception("Installed version of Imagick does not support Fourier functions.");
}
$imagick->forwardFourierTransformimage (true);
$imagick->writeImages ("fourier_test.png", false);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 18:01:28 2024 UTC