How to load IM on ubunto?

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
HardArt

How to load IM on ubunto?

Post by HardArt »

I bought a new pc , 4GB RAM, Intel Core 2 Quad Q8300 processor (2.5GHz, 1333MHz FSB, 4MB Cache) pretty much to run a large formate photoshop file thru IM to convert it to a large 8 bit bmp file.
I haven't had success running the file thru IM in windows 7 so as advised am trying to run it in Linux/Unix environment.
I have loaded Ubunto as a dual boot.
Booted Ubunto downloaded ImageMagick.tar.gz can someone tell me where i should place this file before running the following commands, ./configure, make, sudo makeinstall, as i am doing something wrong and i presume it must be to do with that?

Should I be starting from scratch and using Fedora ?

I'm looking for the easiest solution.

Someone mentioned having to download a list of dependencies http://www.imagemagick.org/download/delegates/ is there an easy way to do that?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to load IM on ubunto?

Post by magick »

We run under Fedora. To install ImageMagick you typically use this command:
  • sudo yum install ImageMagick
However, that release of ImageMagick might be old. If you want the latest version, install the ImageMagick development RPM (which includes all the delegate dependencies) like this:
  • sudo yum install ImageMagick-devel
You can now download and install the latest ImageMagick source release without much fuss:
You may need to tell your system to look into /usr/local/bin for the ImageMagick utilities and in /usr/local/lib for the MagickCore libraries:
  • set path=(/usr/local/bin $path)
    sudo ldconfig /usr/local/lib
To ensure you are using the right release of ImageMagick, type
  • convert -list configure
and look for the version information.
HardArt

Re: How to load IM on ubunto?

Post by HardArt »

Thankyou Magick

Can you look at this for me?
I have done as you said up to the ./configure line and get the following

Code: Select all

checking for C/C++ restrict keyword... __restrict
checking whether byte ordering is bigendian... no
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for long double with more range or precision than double... yes
checking whether char is unsigned... no
checking size of signed short... 2
checking size of unsigned short... 2
checking size of signed int... 4
checking size of unsigned int... 4
checking size of signed long... 4
checking size of unsigned long... 4
checking size of signed long long... 8
checking size of unsigned long long... 8
checking size of off_t... 8
checking size of size_t... 4
checking size of unsigned int*... 4
checking for signed 8-bit type... signed char
checking for unsigned 8-bit type... unsigned char
checking for signed 16-bit type... signed short
checking for unsigned 16-bit type... unsigned short
checking for signed 32-bit type... signed int
checking for unsigned 32-bit type... unsigned int
checking for signed 64-bit type... signed long long
checking for unsigned 64-bit type... unsigned long long
checking for unsigned maximum type... unsigned long long
checking for pointer difference type... unsigned long
checking whether our compiler supports __func__... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap file i/o... yes
checking whether closedir returns void... no
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... (cached) yes
checking for working mmap... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for working memcmp... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking return type of signal handlers... void
checking for working strtod... yes
checking for vprintf... yes
checking for _doprnt... no
checking for sqrt in -lm... yes
checking for _exit... yes
checking for atexit... yes
checking for cimag... yes
checking for clock... yes
checking for directio... no
checking for execvp... yes
checking for fchmod... yes
checking for floor... yes
checking for fork... (cached) yes
checking for ftime... yes
checking for ftruncate... yes
checking for getcwd... yes
checking for getpid... yes
checking for getexecname... no
checking for getdtablesize... yes
checking for getpagesize... (cached) yes
checking for getrlimit... yes
checking for getrusage... yes
checking for gettimeofday... yes
checking for gmtime_r... yes
checking for j0... yes
checking for j1... yes
checking for localtime_r... yes
checking for lstat... yes
checking for memmove... yes
checking for memset... yes
checking for mkstemp... yes
checking for munmap... yes
checking for _NSGetExecutablePath... no
checking for pclose... yes
checking for _pclose... no
checking for poll... yes
checking for popen... yes
checking for _popen... no
checking for posix_fadvise... yes
checking for posix_fallocate... yes
checking for posix_madvise... yes
checking for posix_memalign... yes
checking for pow... yes
checking for pread... yes
checking for pwrite... yes
checking for raise... yes
checking for rand_r... yes
checking for readlink... yes
checking for readdir_r... yes
checking for realpath... yes
checking for select... yes
checking for seekdir... yes
checking for setlocale... yes
checking for sqrt... yes
checking for setvbuf... yes
checking for stat... yes
checking for strchr... yes
checking for strerror_r... yes
checking for strrchr... yes
checking for strcspn... yes
checking for strdup... yes
checking for strpbrk... yes
checking for strspn... yes
checking for strstr... yes
checking for strtol... yes
checking for strtoul... yes
checking for symlink... yes
checking for sysconf... yes
checking for sigemptyset... yes
checking for sigaction... yes
checking for spawnvp... no
checking for strerror... yes
checking for strlcat... (cached) no
checking for strlcpy... (cached) no
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for telldir... yes
checking for tempnam... yes
checking for times... yes
checking for usleep... yes
checking for utime... yes
checking for vsprintf... yes
checking for vsnprintf... yes
checking for waitpid... yes
checking for _wfopen... no
checking for _wstat... no
checking for library containing clock_gettime... none required
checking whether clock_gettime supports CLOCK_REALTIME... yes
checking whether pread is declared... yes
checking whether pwrite is declared... yes
checking whether strlcpy is declared... no
checking whether vsnprintf is declared... yes
checking whether we are using the GNU C++ compiler... (cached) no
checking whether g++ accepts -g... (cached) no
checking dependency style of g++... (cached) none
checking whether the compiler recognizes bool as a built-in type... no
checking whether the compiler implements namespaces... no
checking whether the compiler supports the std namespace... no
checking whether the compiler supports ISO C++ standard library... no
checking whether the compiler implements L"widestring"... no
checking for g++ option to support OpenMP... unsupported
checking whether C++ compiler is sufficient for Magick++... no (failed tests)
checking for X11 configure files... 
checking for GOMP_parallel_start in -lgomp... yes
checking for the pthreads library -lpthread... yes
-------------------------------------------------------------
checking for BZLIB... 
checking bzlib.h usability... no
checking bzlib.h presence... no
checking for bzlib.h... no
checking for BZ2_bzDecompress in -lbz2... no
checking if BZLIB package is complete... no
checking for X... no
-------------------------------------------------------------
checking for ZLIB... 
checking zconf.h usability... no
checking zconf.h presence... no
checking for zconf.h... no
checking zlib.h usability... no
checking zlib.h presence... no
checking for zlib.h... no
checking for compress in -lz... no
checking for uncompress in -lz... no
checking for deflate in -lz... no
checking for inflate in -lz... no
checking for gzseek in -lz... no
checking for gztell in -lz... no
checking if ZLIB package is complete... no
-------------------------------------------------------------
checking for DPS... 
checking DPS/dpsXclient.h usability... no
checking DPS/dpsXclient.h presence... no
checking for DPS/dpsXclient.h... no
checking for DPSInitialize in -ldps... no
checking for DPSInitialize in -ldps... no
checking for XDPSPixelsPerPoint in -ldpstk... no
checking if DPS package is complete... no
-------------------------------------------------------------
checking for DJVU... 
checking libdjvu/ddjvuapi.h usability... no
checking libdjvu/ddjvuapi.h presence... no
checking for libdjvu/ddjvuapi.h... no
checking for ddjvu_context_create in -ldjvulibre... no
checking if DJVU package is complete... no
-------------------------------------------------------------
checking for FFTW... 
checking fftw3.h usability... no
checking fftw3.h presence... no
checking for fftw3.h... no
checking for fftw_execute in -lfftw3... no
checking if FFTW package is complete... no
-------------------------------------------------------------
checking for FlashPIX... 
checking fpxlib.h usability... no
checking fpxlib.h presence... no
checking for fpxlib.h... no
checking for FPX_OpenImageByFilename in -lfpx... no
checking if FlashPIX package is complete... no
-------------------------------------------------------------
checking for FreeType 2.0... 
checking for freetype-config... no
checking for FT_Init_FreeType in -lfreetype... no
checking ft2build.h usability... no
checking ft2build.h presence... no
checking for ft2build.h... no
checking for freetype/freetype.h... no
checking if FreeType package is complete... no
-------------------------------------------------------------
checking for GVC... no

-------------------------------------------------------------
checking for JBIG... 
checking jbig.h usability... no
checking jbig.h presence... no
checking for jbig.h... no
checking for jbg_dec_init in -ljbig... no
checking if JBIG package is complete... no
-------------------------------------------------------------
checking for JPEG... 
checking jconfig.h usability... no
checking jconfig.h presence... no
checking for jconfig.h... no
checking jerror.h usability... no
checking jerror.h presence... no
checking for jerror.h... no
checking jmorecfg.h usability... no
checking jmorecfg.h presence... no
checking for jmorecfg.h... no
checking jpeglib.h usability... no
checking jpeglib.h presence... no
checking for jpeglib.h... no
checking for jpeg_read_header in -ljpeg... no
checking for JPEG library is version 6b or later... no
checking if JPEG package is complete... no
-------------------------------------------------------------
checking for JPEG Version 2... 
checking jasper/jasper.h usability... no
checking jasper/jasper.h presence... no
checking for jasper/jasper.h... no
checking for jas_stream_fopen in -ljasper... no
checking if JPEG version 2 support package is complete... no
-------------------------------------------------------------
checking for LCMS... 
checking lcms2.h usability... no
checking lcms2.h presence... no
checking for lcms2.h... no
checking lcms/lcms2.h usability... no
checking lcms/lcms2.h presence... no
checking for lcms/lcms2.h... no
checking for cmsOpenProfileFromMem in -llcms2... no
checking if LCMS2 package is complete... no
-------------------------------------------------------------
checking for LCMS... 
checking lcms.h usability... no
checking lcms.h presence... no
checking for lcms.h... no
checking lcms/lcms.h usability... no
checking lcms/lcms.h presence... no
checking for lcms/lcms.h... no
checking for cmsOpenProfileFromMem in -llcms... no
checking if LCMS package is complete... no
-------------------------------------------------------------
checking for LQR... no

-------------------------------------------------------------
checking for OPENEXR... no

-------------------------------------------------------------
checking for PNG... 
checking png.h usability... no
checking png.h presence... no
checking for png.h... no
checking for png_get_io_ptr in -lpng... no
checking if PNG package is complete... no
-------------------------------------------------------------
checking for TIFF... 
checking tiff.h usability... no
checking tiff.h presence... no
checking for tiff.h... no
checking tiffio.h usability... no
checking tiffio.h presence... no
checking for tiffio.h... no
checking for TIFFOpen in -ltiff... no
checking for TIFFClientOpen in -ltiff... no
checking for TIFFIsByteSwapped in -ltiff... no
checking for TIFFReadRGBATile in -ltiff... no
checking for TIFFReadRGBAStrip in -ltiff... no
checking if TIFF package is complete... no
-------------------------------------------------------------
checking for WMF... 
checking libwmf/eps.h usability... no
checking libwmf/eps.h presence... no
checking for libwmf/eps.h... no
checking for wmf_eps_function in -lwmf... no
checking if WMF package is complete... no
-------------------------------------------------------------
checking for ImageMagick delegate programs... 
checking for autotrace... autotrace
checking for mplayer... mplayer
checking for blender... blender
checking for bzip2... /bin/bzip2
checking for xdg-open... /usr/bin/xdg-open
checking for ralcgm... ralcgm
checking for cat... /bin/cat
checking for ufraw-batch... ufraw-batch
checking for dot... dot
checking for dvips... dvips
checking for echo... /bin/echo
checking for xterm... /usr/bin/xterm
checking for fig2dev... fig2dev
checking for convert... /usr/local/bin/convert
checking for display... /usr/local/bin/display
checking for mogrify... /usr/local/bin/mogrify
checking for gnuplot... gnuplot
checking for ra_pfm... ra_pfm
checking for hp2xx... hp2xx
checking for html2ps... html2ps
checking for ilbmtoppm... ilbmtoppm
checking for ppmtoilbm... ppmtoilbm
checking for lp... /usr/bin/lp
checking for lpr... /usr/bin/lpr
checking for uncompress... /bin/uncompress
checking for compress... compress
checking for gimp... /usr/bin/gimp
checking for groff... /usr/bin/groff
checking for ffmpeg... ffmpeg
checking for ffmpeg... ffmpeg
checking for mv... /bin/mv
checking for pcl6... pcl6
checking for pgpv... pgpv
checking for povray... povray
checking for gsx... no
checking for gsc... no
checking for gs... /usr/bin/gs
checking for rawtorle... rawtorle
checking for rm... /bin/rm
checking for rsvg... rsvg
checking for scanimage... /usr/bin/scanimage
checking for enscript... enscript
checking for wmf2eps... wmf2eps
checking for curl... curl
checking for gxps... gxps
checking for gzip... /bin/gzip
checking for Dejavu fonts directory... not found!
checking for Ghostscript fonts directory... /usr/share/fonts/type1/gsfonts/
checking for gnutar... no
checking for gtar... no
checking for tar... tar
checking for perl... perl
checking for rpmbuild... no
checking for rpm... no
checking for 7za... no
checking for zip... zip
-------------------------------------------------------------
checking for Ghostscript... 
checking for Ghostscript version... 8.70
checking for gs alpha device... pnmraw
checking for gs color device... pnmraw
checking for gs CMYK device... pam
checking for gs mono device... pbmraw
checking for gs PDF writing device... pdfwrite
checking for gs PS writing device... pswrite
checking for gs EPS writing device... epswrite
-------------------------------------------------------------
checking for Perl... 
checking for perl... /usr/bin/perl
checking for perl version greater than or equal to 5.8.1... ok
-------------------------------------------------------------
Update ImageMagick configuration
configure: creating ./config.status
config.status: creating config/configure.xml
config.status: creating config/delegates.xml
config.status: creating config/ImageMagick.rdf
config.status: creating config/MagickCore.dox
config.status: creating config/MagickWand.dox
config.status: creating config/type-dejavu.xml
config.status: creating config/type-ghostscript.xml
config.status: creating config/type-windows.xml
config.status: creating config/type.xml
config.status: creating ImageMagick.spec
config.status: creating Magick++/bin/Magick++-config
config.status: creating magick/ImageMagick.pc
config.status: creating Magick++/lib/ImageMagick++.pc
config.status: creating Magick++/lib/Magick++.pc
config.status: creating magick/Magick-config
config.status: creating magick/MagickCore-config
config.status: creating magick/MagickCore.pc
config.status: creating magick/version.h
config.status: creating Makefile
config.status: creating magick.sh
config.status: creating PerlMagick/Magick.pm
config.status: creating PerlMagick/Makefile.PL
config.status: creating PerlMagick/check.sh
config.status: creating utilities/animate.1
config.status: creating utilities/compare.1
config.status: creating utilities/composite.1
config.status: creating utilities/conjure.1
config.status: creating utilities/convert.1
config.status: creating utilities/display.1
config.status: creating utilities/identify.1
config.status: creating utilities/ImageMagick.1
config.status: creating utilities/import.1
config.status: creating utilities/mogrify.1
config.status: creating utilities/montage.1
config.status: creating utilities/stream.1
config.status: creating wand/MagickWand-config
config.status: creating wand/MagickWand.pc
config.status: creating wand/Wand-config
config.status: creating wand/Wand.pc
config.status: creating config/config.h
config.status: config/config.h is unchanged
config.status: executing magick/magick-config.h commands
config.status: creating magick/magick-config.h - prefix MAGICKCORE for config/config.h defines
config.status: magick/magick-config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default commands
config.status: executing MagickCore-config.in commands
config.status: executing Magick-config.in commands
config.status: executing MagickWand-config.in commands
config.status: executing Wand-config.in commands
config.status: executing Magick++-config.in commands
config.status: executing PerlMagick/check.sh.in commands

ImageMagick is configured as follows. Please verify that this configuration
matches your expectations.

Host system type: i686-pc-linux-gnu
Build system type: i686-pc-linux-gnu

                  Option                        Value
-------------------------------------------------------------------------------
Shared libraries  --enable-shared=yes		yes
Static libraries  --enable-static=yes		yes
Module support    --with-modules=no		no
GNU ld            --with-gnu-ld=yes		yes
Quantum depth     --with-quantum-depth=16	16
High Dynamic Range Imagery
                  --enable-hdri=no		no

Delegate Configuration:
BZLIB             --with-bzlib=yes		no
Autotrace         --with-autotrace=no		no
Dejavu fonts      --with-dejavu-font-dir=default	none
DJVU              --with-djvu=yes		no
DPS               --with-dps=yes		no
FFTW              --with-fftw=yes		no
FlashPIX          --with-fpx=yes		no
FontConfig        --with-fontconfig=no		no
FreeType          --with-freetype=yes		no
GhostPCL          None				pcl6 (unknown)
GhostXPS          None				gxps (unknown)
Ghostscript       None				gs (8.70)
Ghostscript fonts --with-gs-font-dir=default	/usr/share/fonts/type1/gsfonts/
Ghostscript lib   --with-gslib=no		no
Graphviz          --with-gvc=yes		no
JBIG              --with-jbig=yes		no
JPEG v1           --with-jpeg=yes		no
JPEG-2000         --with-jp2=yes		no
LCMS              --with-lcms=yes		no
LQR               --with-lqr=yes		no
Magick++          --with-magick-plus-plus=yes	no (failed tests)
OpenEXR           --with-openexr=yes		no
PERL              --with-perl=yes		/usr/bin/perl
PNG               --with-png=yes		no
RSVG              --with-rsvg=no		no
TIFF              --with-tiff=yes		no
Windows fonts     --with-windows-font-dir=	none
WMF               --with-wmf=yes		no
X11               --with-x=			no
XML               --with-xml=no		no
ZLIB              --with-zlib=yes		no

X11 Configuration:
      X_CFLAGS        = 
      X_PRE_LIBS      = 
      X_LIBS          = 
      X_EXTRA_LIBS    = 

Options used to compile and link:
  PREFIX          = /usr/local
  EXEC-PREFIX     = /usr/local
  VERSION         = 6.6.1
  CC              = gcc -std=gnu99 -std=gnu99
  CFLAGS          = -fopenmp -g -O2 -Wall -W -pthread
  CPPFLAGS        = -I/usr/local/include/ImageMagick
  PCFLAGS         = -fopenmp
  DEFS            = -DHAVE_CONFIG_H
  LDFLAGS         = 
  MAGICK_LDFLAGS  = -L/usr/local/lib 
  LIBS            = -lMagickCore -lm -lgomp -lpthread 
  CXX             = g++
  CXXFLAGS        = -pthread

hagraphics@ubuntu:~/ImageMagick-6.6.1$ 
Does this mean I should run set path=(/usr/local/bin $path)
I get the following
hagraphics@ubuntu:~/ImageMagick-6.6.1$ set path=(/usr/local/bin $path)
bash: syntax error near unexpected token `(' i am clueless here, should i be adapting that path to set path=(/ hagraphics/local/bin $path) or something similar

I then ran sudo ldconfig /usr/local/lib which resulted in no comments

Guidance gratefully recieved Thanks
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to load IM on ubunto?

Post by magick »

Unfortunately this is the ImageMagick forum, not the Linux forum so you'll need to do so research on how to set up paths in bash. We use TCSH. The configure script output suggests that nearly none of the useful delegates were found. Typically when you install the development version of ImageMagick, it installs many of the delegate libraries such as JPEG, PNG, LCMS, etc. ImageMagick must find the delegate library header files (e.g. /usr/include/jpeglib.h) when you run the configure script to include support for a particular delegate library (e.g. JPEG).
DaPony

Re: How to load IM on ubunto?

Post by DaPony »

Well, if that ubunto of Yours is any similar to my ubuntu, You could try the following:

get ImageMagick source code
On page
http://www.imagemagick.org/script/insta ... e.php#unix
You find the link
ftp://ftp.imagemagick.org/pub/ImageMagi ... ick.tar.gz

place source code archive ImageMagick.tar.gz somewhere in Your home directory
(or leave it on Your desktop if Your browser put it there)

extract source code archive

Code: Select all

tar xvfz ImageMagick.tar.gz
or right-click in GUI (e.g. Filemanager nautilus) on file ImageMagick.tar.gz => extract here

get some dependencies (could get more, but this should get You started)

Code: Select all

sudo apt-get install libautotrace-dev libfreetype6-dev libgs-dev libjpeg62-dev liblqr-1-0-dev libpng12-dev libtiff4-dev libwmf-dev libx11-dev libxml++2.6-dev zlib1g-dev libperl-dev
goto ImageMagick source folder (created in step 3)

Code: Select all

./configure --without-magick-plus-plus LDFLAGS=-L/usr/local/lib
If You happen to need Magick++ API, You will have to find a solution for that.
I ran into some difficulties a year or so ago, so I just skipped Magick++ with --without-magick-plus-plus.

Code: Select all

make

Code: Select all

sudo make install

Code: Select all

sudo ldconfig -v

Code: Select all

make check
Tests should pass without errors (You want to see green color)
Post Reply