-
Notifications
You must be signed in to change notification settings - Fork 1
technologyImageMagick
At first we need to install ImageMagick which can be installed in Ubuntu via
sudo apt-get install imagemagick
At the moment this is version 6.6.9
using a bit depth of 16.
We need JMagick for the installed ImageMagick version which can be all found at this github page. Clone the repository,
git clone https://github.com/techblue/jmagick.git
switch into the directory and checkout the branch matching your ImageMagick version, e.g. git checkout 6.6.9
.
In the next step configure JMagick.
./configure
If this fails due to missing image magick header files install libmagickcore-dev
to get them.
sudo apt-get install libmagickcore-dev
Now create the library files via
make all
and install them
sudo make install
which will create multiple files in
/usr/local/lib/
but to be version independend, I guess, JMagick expects jmagick.jar
, which is not existing yet.
Create a soft link to the JAR in version 6.6.9 which was created due to make install
:
sudo ln -s jmagick-6.6.9.jar jmagick.jar
Metalcon components using ImageMagick are aware of this library files via a Maven configuration you can see here.
If you want to use Eclipse you will have to add the path to the java library path in the run configuration manually:
Add
-Djava.library.path=/usr/local/lib/
to the VM arguments field in the tab 'Arguments'.
Source: http://stackoverflow.com/questions/3553415/jmagick-error-when-trying-to-load-a-file-unsatisfiedlink
Maven dependency:
<dependency>
<groupId>jmagick</groupId>
<artifactId>jmagick</artifactId>
<version>6.6.9</version>
</dependency>
If you are going to install ImageMagick manually make sure to install the libraries for the image formats you want to support:
- JPEG: libjpeg8-dev
- PNG: libpng12-dev
- TIFF: libtiff4-dev
and also some additional libraries
- compression: zlib1g-dev
- c routines: libglib2.0-dev
- Magick core: libMagickCore4
found in the blog post of Sree.
In the source directory run
./configure --with-quantum-depth=8
to configure ImageMagick using 8 bit per pixel
Call
make
to compile ImageMagick and then
sudo make install
to install it on your system.
Verify a proper installation via
identify -version
You should see
Version: ImageMagick 6.4.0 09/04/13 Q8 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC
Now you switch to the JMagick source code directory an call again
./configure --with-quantum-depth=8
and then
make all
to compile JMagick. Install it via
sudo make install
as your next step.