Doc #69903 [Asn->Nab]: function forwardFourierTransformimage returns error
| From: | danack@php.net | Date: | Sat, 05 Dec 2015 14:08:47 +0000 |
| Subject: | Doc #69903 [Asn->Nab]: function forwardFourierTransformimage returns error | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-12904@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69903&edit=1
ID: 69903
Updated by: danack@php.net
Reported by: lee dot traynor at skeptic dot de
Summary: function forwardFourierTransformimage returns error
-Status: Assigned
+Status: Not a bug
Type: Documentation Problem
Package: imagick
Operating System: Windows XP
PHP Version: 5.5.26
Assigned To: danack
Block user comment: N
Private report: N
New Comment:
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);
Previous Comments:
------------------------------------------------------------------------
[2015-06-23 21:32:26] 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-06-23 16:29:12] 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 16:20:47] 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-22 17:54:40] 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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69903&edit=1