delegate library support

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
GuyVerachtert
Posts: 2
Joined: 2009-12-15T01:59:40-07:00
Authentication code: 8675309

delegate library support

Post by GuyVerachtert »

Hi everyone,

I'm sorry to ask this "newbee" question, but i'm just stuck ... :-)

when i run :

Code: Select all

convert -fft logo.gif logo_fft.gif
i get :

Code: Select all

convert: delegate library support not built-in 'logo.gif' (FTTW) @ fourier.c/ForwardFourierTransformImage/611.
Can someone please tell me what this means ?

I am running on XP, and i installed the "ImageMagick-6.5.8-4-Q16-windows-dll.exe" package.

Thanks for yopur help,

Guy
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: delegate library support

Post by fmw42 »

First you need to install the FFTW delegate library that is the core of the FFT code and then recompile IM. This is free open source code. The nominal binaries only come with certain delegate libraries preinstalled and FFTW is not one of them. Mostly the ones installed are for the most common image formats, such as gif, jpg, tiff, png, etc. I am not an expert on installation and know nothing about Windows, but you may have to install from IM source rather than binary. But give it a try by installing the delegate below and then reinstalling IM if the FFT does not work. For Windows source installation, see http://www.imagemagick.org/download/www ... ml#windows

For FFTW, see http://www.fftw.org/ and also http://www.imagemagick.org/script/comma ... ns.php#fft

Second your command structure is incorrect. See http://www.imagemagick.org/Usage/basics/#cmdline

convert image.xxx -fft fftimage.png

This will produce two output images, fftimage-0.png and fftimage-1.png. You should use PNG or some 24-bit color image format for the output and should be on Q16 IM for highest quality. The first image will be the magnitude image and the second will be the phase image.

For a tutorial, see http://www.fmwconcepts.com/imagemagick/ ... urier.html and/or http://www.imagemagick.org/Usage/fourier/
GuyVerachtert
Posts: 2
Joined: 2009-12-15T01:59:40-07:00
Authentication code: 8675309

Re: delegate library support

Post by GuyVerachtert »

Thanks for your answer, it makes perfect sence :)

I've downloaded both FFTW and source for IM, but how do i integrate the two ?
I've managed to compile IM, but i don't know where to add the FFTW files ...

Kind regards,

Guy
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: delegate library support

Post by fmw42 »

I am not a Windows user, so all I can tell you is how I did it on my Mac. First install FFTW as per its instructions. It should go automatically where ever your default install goes (/usr/local/bin at least on my Mac). Likewise, install any other delegate libraries, such as jpg, png, tif, etc. Then install IM from source manually. It should then install to the same default location and should find FFTW as they both are installed now in the same default directory. IM needs to be installed (or reinstalled) after any delegate is installed. Once that is done, you can check if IM recognizes FFTW by typing

convert -list configure

and look at the line starting with DELEGATES. Mine looks like:

DELEGATES bzlib fftw fontconfig freetype gs jpeg jng jp2 lcms lqr openexr png tiff x11 xml zlib

If you have installed IM and all the delegates to the same directory, then IM should be able to find the delegates.

Some Windows expert can probably give you more pointers about installing delegates and IM.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: delegate library support

Post by fmw42 »

As of IM 6.6.0-9, FFT now works in ImageMagic, thanks to user el_supremo. For installation instructions, see viewtopic.php?f=4&t=14251#p56836
markanini
Posts: 14
Joined: 2010-06-15T12:55:03-07:00
Authentication code: 8675308
Location: Malmö, Sweden

Re: delegate library support

Post by markanini »

Another windows user here, dying to try Fred's 'notch' script on various problematic images.
Being forced to compile from source is disconcerting to me as I have no previous experience with compilers.
Any chance there's a special build available with FFT support built-in?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: delegate library support

Post by fmw42 »

markanini wrote:Another windows user here, dying to try Fred's 'notch' script on various problematic images.
Being forced to compile from source is disconcerting to me as I have no previous experience with compilers.
Any chance there's a special build available with FFT support built-in?

Please note my scripts are unix bash scripts and do not run directly under Windows. You would need to install Cygwin as well.
ghostrider
Posts: 2
Joined: 2012-03-26T13:11:27-07:00
Authentication code: 8675308

Re: delegate library support

Post by ghostrider »

I needed to run FFT on my astrophoto images and I use Windows, so I had to tinker and compile ImageMagick with FFTW support. To save other people the thouble, I've made the 32-bit binaries available for download here - http://blog.astrophotographytargets.com ... n-windows/
Post Reply