delegate library support not built-in

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
User avatar
TechnoPhil
Posts: 22
Joined: 2010-10-27T08:21:15-07:00
Authentication code: 8675308
Location: San Marino

delegate library support not built-in

Post by TechnoPhil »

Hi,
i installed ImageMagick on my Mac (ver. 10.7.4) in this way:

Code: Select all

tar xvfz ImageMagick-x86_64-apple-darwin11.3.0.tar.gz && sudo cp -rf ImageMagick-6.7.5/ /usr/local/
I can use ImageMagick, i am trying to use this command that works on my Ubuntu:

Code: Select all

mogrify -quality 85 -density 72 -resize 800x533 -fill white -pointsize 15 -font Times-BoldItalic -draw "text 10,15 '© TechnoPhil - technophil.sm' " *.JPG
The error is:

Code: Select all

mogrify: unable to read font `Times-BoldItalic' @ warning/annotate.c/RenderType/868.
mogrify: delegate library support not built-in `Times-BoldItalic' (Freetype) @ warning/annotate.c/RenderFreetype/1523.
mogrify: Postscript delegate failed `/var/folders/fd/yh6dz5rx5vqfxhxy6ldm10_w0000gp/T/magick-xIJklurV': No such file or directory @ error/ps.c/ReadPSImage/830.
mogrify: unable to read font `Times-BoldItalic' @ warning/annotate.c/RenderType/868.
mogrify: delegate library support not built-in `Times-BoldItalic' (Freetype) @ warning/annotate.c/RenderFreetype/1523.
mogrify: Postscript delegate failed `/var/folders/fd/yh6dz5rx5vqfxhxy6ldm10_w0000gp/T/magick-aLUudkLJ': No such file or directory @ error/ps.c/ReadPSImage/830.
mogrify: unable to read font `Times-BoldItalic' @ warning/annotate.c/RenderType/868.
mogrify: delegate library support not built-in `Times-BoldItalic' (Freetype) @ warning/annotate.c/RenderFreetype/1523.
mogrify: Postscript delegate failed `/var/folders/fd/yh6dz5rx5vqfxhxy6ldm10_w0000gp/T/magick-UAHIdnMn': No such file or directory @ error/ps.c/ReadPSImage/830.
mogrify: unable to read font `Times-BoldItalic' @ warning/annotate.c/RenderType/868.
mogrify: delegate library support not built-in `Times-BoldItalic' (Freetype) @ warning/annotate.c/RenderFreetype/1523.
mogrify: Postscript delegate failed `/var/folders/fd/yh6dz5rx5vqfxhxy6ldm10_w0000gp/T/magick-zvaeSXJ5': No such file or directory @ error/ps.c/ReadPSImage/830.
mogrify: unable to read font `Times-BoldItalic' @ warning/annotate.c/RenderType/868.
mogrify: delegate library support not built-in `Times-BoldItalic' (Freetype) @ warning/annotate.c/RenderFreetype/1523.
mogrify: Postscript delegate failed `/var/folders/fd/yh6dz5rx5vqfxhxy6ldm10_w0000gp/T/magick-teWhFcRq': No such file or directory @ error/ps.c/ReadPSImage/830.
mogrify: unable to read font `Times-BoldItalic' @ warning/annotate.c/RenderType/868.
mogrify: delegate library support not built-in `Times-BoldItalic' (Freetype) @ warning/annotate.c/RenderFreetype/1523.
mogrify: Postscript delegate failed `/var/folders/fd/yh6dz5rx5vqfxhxy6ldm10_w0000gp/T/magick-Hk7HzrHD': No such file or directory @ error/ps.c/ReadPSImage/830.
mogrify: unable to read font `Times-BoldItalic' @ warning/annotate.c/RenderType/868.
mogrify: delegate library support not built-in `Times-BoldItalic' (Freetype) @ warning/annotate.c/RenderFreetype/1523.
mogrify: Postscript delegate failed `/var/folders/fd/yh6dz5rx5vqfxhxy6ldm10_w0000gp/T/magick-_6IhCUfn': No such file or directory @ error/ps.c/ReadPSImage/830.
mogrify: unable to read font `Times-BoldItalic' @ warning/annotate.c/RenderType/868.
mogrify: delegate library support not built-in `Times-BoldItalic' (Freetype) @ warning/annotate.c/RenderFreetype/1523.
mogrify: Postscript delegate failed `/var/folders/fd/yh6dz5rx5vqfxhxy6ldm10_w0000gp/T/magick-BcrT4WEi': No such file or directory @ error/ps.c/ReadPSImage/830.
What can i do to resolve this problem? It is from this morning that I'm trying to find a solution!
Thanks you :(
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: delegate library support not built-in

Post by fmw42 »

specify the full path the font. or use Anthony's script, imagick_type_gen at http://www.imagemagick.org/Usage/scripts/ to modify the type.xml file so that it knows about names.

Do you have all the needed delegates? What does

convert -list configure

show for the line starting with DELEGATES

Does it include freetype and fontconfig? I am not sure if both are needed, though.
User avatar
TechnoPhil
Posts: 22
Joined: 2010-10-27T08:21:15-07:00
Authentication code: 8675308
Location: San Marino

Re: delegate library support not built-in

Post by TechnoPhil »

What is the full path of the fonts?
This is my convert -list configure:

Code: Select all

CC            gcc -std=gnu99 -std=gnu99
CFLAGS        -D_THREAD_SAFE -D_THREAD_SAFE -pthread -fopenmp -g -O2 -Wall -D_THREAD_SAFE -pthread
CODER_PATH    /ImageMagick-6.7.5/lib/ImageMagick-6.7.5/modules-Q16/coders
CONFIGURE     ./configure  '--disable-dependency-tracking' '--disable-installed' '--enable-delegate-build' '--enable-shared' '--disable-static' '--with-modules' '--without-frozenpaths' '--prefix=/ImageMagick-6.7.5'
CONFIGURE_PATH /ImageMagick-6.7.5/etc/ImageMagick/
COPYRIGHT     Copyright (C) 1999-2012 ImageMagick Studio LLC
CPPFLAGS      -I/ImageMagick-6.7.5/include/ImageMagick
CXX           g++
CXXFLAGS      -g -O2 -D_THREAD_SAFE -pthread
DEFS          -DHAVE_CONFIG_H
DELEGATES     bzlib jpeg jng png tiff x11 xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --disable-installed --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-wmf=no --with-perl=no
DOCUMENTATION_PATH /ImageMagick-6.7.5/share/doc/ImageMagick/
EXEC-PREFIX   /ImageMagick-6.7.5
EXECUTABLE_PATH /ImageMagick-6.7.5/bin
FEATURES      OpenCL OpenMP 
FILTER_PATH   /ImageMagick-6.7.5/lib/ImageMagick-6.7.5/modules-Q16/filters
HOST          x86_64-apple-darwin11.3.0
INCLUDE_PATH  /ImageMagick-6.7.5/include/ImageMagick
LDFLAGS       -L/ImageMagick-6.7.5/lib -L/Users/cristy/ImageMagick-6.7.5-7/jpeg/.libs -L/Users/cristy/ImageMagick-6.7.5-7/jpeg -L/Users/cristy/ImageMagick-6.7.5-7/magick -L/Users/cristy/ImageMagick-6.7.5-7/png/.libs -L/Users/cristy/ImageMagick-6.7.5-7/png -L/Users/cristy/ImageMagick-6.7.5-7/tiff/libtiff/.libs -L/Users/cristy/ImageMagick-6.7.5-7/tiff/libtiff -L/Users/cristy/ImageMagick-6.7.5-7/wand -L/usr/X11/lib -R/usr/X11/lib -L/usr/X11/lib
LIB_VERSION   0x675
LIB_VERSION_NUMBER 6,7,5,7
LIBRARY_PATH  /ImageMagick-6.7.5/lib/ImageMagick-6.7.5
LIBS          -lMagickCore -ltiff -ljpeg -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lm -lgomp -Wl,-framework,OpenCL -lm -lpthread -lltdl
NAME          ImageMagick
PCFLAGS       -fopenmp
PREFIX        /ImageMagick-6.7.5
QuantumDepth  16
RELEASE_DATE  2012-02-20
SHARE_PATH    /ImageMagick-6.7.5/share/ImageMagick-6.7.5
SVN_REVISION  6904
TARGET_CPU    x86_64
TARGET_OS     darwin11.3.0
TARGET_VENDOR apple
VERSION       6.7.5
WEBSITE       http://www.imagemagick.org
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: delegate library support not built-in

Post by fmw42 »

I am not an expert on this, but your delegates show:
DELEGATES bzlib jpeg jng png tiff x11 xml zlib
They do not include freetype and fontconfig, which may be needed. The IM developers should be able to tell you more. Or look them up in Google.

http://freetype.sourceforge.net/freetype2/index.html
http://www.freedesktop.org/wiki/Software/fontconfig

As to the path, you need to find where your fonts are on your system. If on mac, look in (cd to) /Library/Fonts or ~/Library/Fonts. Then use pwd to find that full path. Then put that full path with the font that you want to use with its suffix, e.g. ...-font "/Library/Fonts/Arial.ttf" ...

Try the latter. If that does not work, then perhaps you need to install the delegates above.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: delegate library support not built-in

Post by fmw42 »

tar xvfz ImageMagick-x86_64-apple-darwin11.3.0.tar.gz && sudo cp -rf ImageMagick-6.7.5/ /usr/local/
I am not sure this is installed properly/completely. Or you left out the rest of the install commands. You appear to be installing from binary. See instructions at http://www.imagemagick.org/script/binar ... php#macosx. If you follow those commands, you should get most of the needed delegates.

Alternately, you can download and install all the needed delegates from MacPorts and then download and install IM from MacPorts. See
http://www.imagemagick.org/download/www ... .html#unix
User avatar
TechnoPhil
Posts: 22
Joined: 2010-10-27T08:21:15-07:00
Authentication code: 8675308
Location: San Marino

Re: delegate library support not built-in

Post by TechnoPhil »

I have already tried the MacPort install and it works!
Now i would like to try the manual install!
As you said, maybe i had not installed properly ImageMagick! I tried also this one: http://cactuslab.com/imagemagick/ but i have the same problem!
I can't understand what i am wrong with the installation! :(
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: delegate library support not built-in

Post by fmw42 »

TechnoPhil wrote:I have already tried the MacPort install and it works!
Now i would like to try the manual install!
As you said, maybe i had not installed properly ImageMagick! I tried also this one: http://cactuslab.com/imagemagick/ but i have the same problem!
I can't understand what i am wrong with the installation! :(
I do not think you can have two versions installed at the same time the way you are going about it. You need to have your ./configure file specify which to use and where the delegates are.

If the MacPorts install works fine, why do you need to go the manual install route?

If you want to do what I do, I install all my delegates from MacPorts and then install IM from source. But to do that you have to specify where the delegates are located in the ./configure file. This is what I use (disabled OpenMP and disabled OpenCV).



./configure CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' \
--enable-delegate-build --enable-shared --disable-static --disable-opencl \
--with-modules --with-quantum-depth=16 --with-gslib --without-wmf \
--disable-silent-rules --disable-dependency-tracking --disable-openmp \
--with-gs-font-dir=/opt/local/share/ghostscript/fonts/ --with-lqr


Note I have installed Ghostscript from MacPorts and its font directory, so I have to specify both here.

Here are the delegates that I installed previously using MacPorts which installs to /opt. So above I have to specify CPPFLAGS and LDFLAGS to that location. see http://www.imagemagick.org/script/advan ... lation.php


DELEGATES bzlib fftw fontconfig freetype gs jpeg jng jp2 lcms2 lqr openexr pango png rsvg tiff x11 xml zlib
User avatar
TechnoPhil
Posts: 22
Joined: 2010-10-27T08:21:15-07:00
Authentication code: 8675308
Location: San Marino

Re: delegate library support not built-in

Post by TechnoPhil »

I would like to install manually ImageMagick because i am running Mac OS un a 64GB SSD!
If i install IM from MacPort, i need XCODE (1,5GB), but IM is only 36MB!
That's why i need to use it without XCODE, i have no free space!

Have you ever considered a .dmg installation for Mac?
Maybe it would be enough a compiled binary file to put in /usr/local/bin folder. :(
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: delegate library support not built-in

Post by fmw42 »

TechnoPhil wrote:I would like to install manually ImageMagick because i am running Mac OS un a 64GB SSD!
If i install IM from MacPort, i need XCODE (1,5GB), but IM is only 36MB!
That's why i need to use it without XCODE, i have no free space!

Have you ever considered a .dmg installation for Mac?
Maybe it would be enough a compiled binary file to put in /usr/local/bin folder. :(
I am not a developer so you would need to hear back from them.

But I do know that if you want to use the display function to view images (via X11), then you do need to install Xcode Tools even if you use IM from source code.
User avatar
TechnoPhil
Posts: 22
Joined: 2010-10-27T08:21:15-07:00
Authentication code: 8675308
Location: San Marino

Re: delegate library support not built-in

Post by TechnoPhil »

Thank you very much for your help!
I ask them! :?
Post Reply