Installation of JPEG Delegate Libraries

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
cparker030
Posts: 3
Joined: 2012-10-17T10:27:01-07:00
Authentication code: 67789

Installation of JPEG Delegate Libraries

Post by cparker030 »

I am going through my IT department to have ImageMagick installed on our servers and need JPEG support installed. We have tried to follow the directions for completing this process and are either skipping a step somewhere or mis-interpreting the directions on the ImageMagick site. This is on a SuSe Linux system and the details of our installation attempt are below. I assume we are doing something wrong with the libraries because I don't see them listed in LIB, can someone assist to let us know what we are doing wrong and what the correct steps are?

[From IT:]

I have compiled and installed “ImageMagick 6.7.9-9” with default settings (such as /usr/local)
SUSE Linux Enterprise Server 11 (i586)
VERSION = 11
PATCHLEVEL = 1

Following is the steps I took for installation:

linaca2:~ # tar xvfz ImageMagick-6.7.9-9.tar.gz
linaca2:~ # cd ImageMagick-6.7.9-9
linaca2:~ #./configure '--with-png=yes' '--with-jpeg=yes' '--with-jp2=yes' '--with-freetype=yes'
linaca2:~ # make
linaca2:~ # make install
linaca2:~ # make check
linaca2:~ # identify -list configure
Path: /usr/local/lib/ImageMagick-6.7.9/config/configure.xml
Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99 -std=gnu99
CFLAGS -fopenmp -g -O2 -Wall -pthread
CODER_PATH /usr/local/lib/ImageMagick-6.7.9/modules-Q16/coders
CONFIGURE ./configure '--with-png=yes' '--with-jpeg=yes' '--with-jp2=yes' '--with-freetype=yes'
CONFIGURE_PATH /usr/local/etc/ImageMagick/
COPYRIGHT Copyright (C) 1999-2012 ImageMagick Studio LLC
CPPFLAGS -I/usr/local/include/ImageMagick
CXX g++
CXXFLAGS -g -O2 -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-gvc=no --with-rsvg=no --with-wmf=no --with-perl=no
DOCUMENTATION_PATH /usr/local/share/doc/ImageMagick-6.7.9
EXEC-PREFIX /usr/local
EXECUTABLE_PATH /usr/local/bin
FEATURES OpenMP
FILTER_PATH /usr/local/lib/ImageMagick-6.7.9/modules-Q16/filters
HOST i686-pc-linux-gnu
INCLUDE_PATH /usr/local/include/ImageMagick
LDFLAGS -L/usr/local/lib
LIB_VERSION 0x679
LIB_VERSION_NUMBER 6,7,9,9
LIBRARY_PATH /usr/local/lib/ImageMagick-6.7.9
LIBS -lMagickCore -lm -lgomp -lpthread -lltdl
NAME ImageMagick
PCFLAGS -fopenmp
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 2012-10-09
SHARE_PATH /usr/local/share/ImageMagick-6.7.9
SVN_REVISION 9474
TARGET_CPU i686
TARGET_OS linux-gnu
TARGET_VENDOR pc
VERSION 6.7.9
WEBSITE http://www.imagemagick.org

Path: [built-in]

There are PNG and jPEG packages and libraries installed in the system as follows:

Name │Summary │Avail. Vers.│Inst. Vers.│Size
---------------------------------------------------------------------------------------------------------
latex2html-pngicons│Icons in the PNG format for the LaTeX to HTML Converter│2002.2.1 │2002.2.1 │ 8.0 KiB
libpng12-0 │Library for the Portable Network Graphics Format (PNG) │1.2.31 │1.2.31 │ 162.0 KiB
jpeg │Independent JPEG Group's JPEG Software│6b │6b │ 285.0 KiB
libjpeg│JPEG libraries │6.2.0 │6.2.0 │ 138.0 KiB

I downloaded libraries from http://www.imagemagick.org/download/delegates/ on to folder “/opt/ImageMagick-delegate”
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Installation of JPEG Delegate Libraries

Post by fmw42 »

Your jpg and png libraries may not be in a location that IM can find. check with

convert -list configure | grep -i "delegates"

and see what is listed. Does it include jpg and png?

Did you install IM after installing these delegates? Also you may want to search the web for more current versions.
cparker030
Posts: 3
Joined: 2012-10-17T10:27:01-07:00
Authentication code: 67789

Re: Installation of JPEG Delegate Libraries

Post by cparker030 »

When we tried convert -list configure | grep -i "delegates" we come up with a blank:

DELEGATES

With nothing listed after. What would be the correct steps we need to take to tell ImageMagick where the libraries are and to get them properly configured?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Installation of JPEG Delegate Libraries

Post by fmw42 »

Sorry, I am not a unix expert. All I can do is point you to http://www.imagemagick.org/script/advan ... #configure

see the CPPFLAGS and LDFLAGS.

If I were doing this, I would remove your old delegates and reinstall again from fresh and then reinstall IM again all with the default locations for installation. That should allow IM to find your delegates. But you may be able to use those flags above.

On my Mac, I have MacPorts install all my delegates to /opt and then manually install IM to /usr/local. The two flags in my ./configure command tell IM where the delegates are. This is an example:


./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 --without-pango \
--with-gs-font-dir=/opt/local/share/ghostscript/fonts/ --with-lqr
cparker030
Posts: 3
Joined: 2012-10-17T10:27:01-07:00
Authentication code: 67789

Re: Installation of JPEG Delegate Libraries

Post by cparker030 »

We attempted to reconfigure but so far no success. We located where we unpacked the delegate libraries (all from http://www.imagemagick.org/download/delegates/) and they are in usr/local/lib in their individual folders (e.g. jpeg-7). I'm not sure if jpeg-7 is the one that we need, but there are libjpeg.map and libjpeg.txt files in that folder. We tried:

./configure CPPFLAGS='-l/opt/local/include' LDFLAGS='-l/opt/local/lib/jpeg-7' LIBS=-libjpeg '--with-jpeg=yes'

Alternatively we also found that our OS has a default installation of a libjpeg in usr/lib (file names are libjpeg.so.62 and libjpeg.so.62.0.0), so we tried to use those as well. The configuration runs into an error saying that it cannot compile because it cannot locate libjpeg:

configure:4771: checking whether the C compiler works
configure:4793: gcc -L/usr/local/include -L/usr/local/lib conftest.c -libjpeg >&5
/usr/lib/gcc/i586-suse-linux/4.3/../../../../i586-suse-linux/bin/ld: cannot find -libjpeg
collect2: ld returned 1 exit status
configure:4797: $? = 1
configure:4835: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "ImageMagick"
| #define PACKAGE_TARNAME "ImageMagick"
| #define PACKAGE_VERSION "6.7.9-9"
| #define PACKAGE_STRING "ImageMagick 6.7.9-9"
| #define PACKAGE_BUGREPORT "http://www.imagemagick.org"
| #define PACKAGE_URL ""
| #define MAGICK_TARGET_CPU i686
| #define MAGICK_TARGET_VENDOR pc
| #define MAGICK_TARGET_OS linux-gnu
| #define PACKAGE "ImageMagick"
| #define VERSION "6.7.9-9"
| /* end confdefs.h. */

I feel like there's something small or obvious we are missing to get this right, any ideas?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Installation of JPEG Delegate Libraries

Post by fmw42 »

./configure CPPFLAGS='-l/opt/local/include' LDFLAGS='-l/opt/local/lib/jpeg-7' LIBS=-libjpeg '--with-jpeg=yes'
This is only relevant for delegates installed in /opt. You should not need it if your delegates are installed in /usr/local and your IM is installed there.

There can be conflicts if you have multiple and different versions of a given delegate installed.

I am not a Linux expert. I work on a Mac. My best suggestion would be to install IM from a binary using some RPM. If you cannot do that, then I would suggest you remove all your delegates that you want IM to see and remove IM. Then re-install the delegates. Be sure you know where they go and check the config.log to be sure there are no errors and then re-install IM from source.
linaca2:~ #./configure '--with-png=yes' '--with-jpeg=yes' '--with-jp2=yes' '--with-freetype=yes'
You have to install all these delegates before using IM and you should not have to enable them in your ./configure file, though it should not matter. IM should see them if they were installed properly before installing IM. (I am not sure what the effect of the quotes are. I never have to do that)

But take all this with a grain of salt as I am not a Linux expert.
Post Reply