Installation of Image::Magick under Debian |
Introduction |
Installation |
Debian and Fonts |
Sample code |
Author |
Image::Magick can be very difficult to install, so this article shows how to compile from source.
If you can use Debian's packaging system, that's often the easiest way, but of course limits you to whatever version is available from Debian's repo. The steps are:
shell> aptitude install ImageMagick shell> cpanm Image::Magick
I did not use that method myself, but I do suggest you try it before the instructions herein.
Also, there is Alien::ImageMagick. However, using that module still requires ImageMagick to be compiled, and may well require Perl itself to be re-compiled, so be sure to scrutinize the instructions before attempting it.
shell> sudo aptitude install libpng12-dev libgraphviz-dev libjpeg8-dev libfreetype6-dev
mv ImageMagick-ImageMagick-6-9043f3d1fb76c8f4f158d75dc6e2455c43d2f1de.tar.bz2 ImageMagick
cd ImageMagick
bunzip2 ImageMagick-ImageMagick-6-9043f3d1fb76c8f4f158d75dc6e2455c43d2f1de.tar.bz2
tar xvf ImageMagick-ImageMagick-6-9043f3d1fb76c8f4f158d75dc6e2455c43d2f1de.tar
cd ImageMagick-ImageMagick-6-9043f3d1fb76c8f4f158d75dc6e2455c43d2f1de
vi PerlMagick/Makefile.PL.in PerlMagick/default/Makefile.PL.in PerlMagick/quantum/Makefile.PL.in
ack lperl
See http://imagemagick.org/script/advanced-unix-installation.php
./configure --with-gnu-ld --with-perl
make
sudo make install
dir /usr/local/lib
convert -version
Output:
Version: ImageMagick 6.9.3-0 Q16 x86_64 2015-12-27 http://www.imagemagick.org Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC License: http://www.imagemagick.org/script/license.php Features: Cipher DPC OpenMP Delegates (built-in): fontconfig freetype gvc jng jpeg pangocairo png x xml zlib
convert logo: logo.gif
identify logo.gif
Output:
logo.gif GIF 640x480 640x480+0+0 8-bit sRGB 256c 28.6KB 0.000u 0:00.000
perl -e 'use Image::Magick; print Image::Magick->QuantumDepth,"\n"'
Output:
16
cd ..
rm ImageMagick-ImageMagick-6-9043f3d1fb76c8f4f158d75dc6e2455c43d2f1de/
ImageMagick-ImageMagick-6-9043f3d1fb76c8f4f158d75dc6e2455c43d2f1de.tar
If you're using Debian, run fc-list
for a list of installed fonts.
More information on Debian's support for fonts can be found on Debian's wiki.
http://savage.net.au/ImageMagick/Debian.font.list.p.l.txt
Ron Savage. 2015-12-30.