> nat wrote on 27.04.2004:
> 
> >earlier <[EMAIL PROTECTED]> wrote...
> >
> >> Hi all,
> >> 
> >> I need to convert JPEGS to Grayscale TIFS
> >>              Large Size JPEGS.
> >> 
> >> Which is the best module I should opt for ?
> >
> >Imagemagick is really good.
> >
> >http://www.imagemagick.org/www/perl.html
> >
> Funny, I just asked how to install Image::Magick on Mac OS X at
[EMAIL PROTECTED] and was told to use Imager instead. So I'll post my
question again:
>

Saw your message there.  Imager might be a good choice for you overall,
but then that isn't really what you asked. Assuming you have good
reasons to want Image::Magick, then it is a fine module.  I was also
hoping someone with a bit more OS X experience would suggest how to
solve this the "Apple Way".
 
> I try to install the Image::Magick module. ImageMagick itself was
installed by a TeX distribution (gwTeX), and I found:
> 
> drwxr-xr-x  14 root  admin   476 22 Mar 12:15 Magick++
> -rw-r--r--   1 root  admin   389  7 Feb 16:00 Magick++.h
> drwxr-xr-x   3 root  admin   102 10 Nov 00:26 freetype2
> -rw-r--r--   1 root  admin  3814  4 Jan 21:31 ft2build.h
> drwxr-xr-x  18 root  admin   612 22 Mar 12:14 libwmf
> drwxr-xr-x  33 root  admin  1122 22 Mar 12:15 magick
> -rw-r--r--   1 root  admin   755  7 Feb 17:03 uninameslist.h
> 
> in ./usr/local/include/.
> 
> Now the installation instructions tell me to 
> 
> >edit Makefile.PL and change LIBS and INC to include the
> >appropriate path information to the required libMagick library. You
> >will also need library search paths (-L) to JPEG, PNG, TIFF, etc.
> >libraries if they were included with your installed version of
> >ImageMagick.
> 
> The actual settings are:
> 
>  # Header search specfication and preprocessor flags
>    'INC'    => '-I../ -I.. -I/usr/include/freetype2
-I/usr/X11R6/include -I/usr/X11R6/include/X11 -I/usr/include/libxml2',
> 

The above will need a -I/usr/local/include added to it to specify that
path as part of the includes path.

>    # Library specification
>    'LIBS'   => ['-L/usr/local/lib -L../magick/.libs -lMagick
-L/usr/X11R6/lib -L/usr/lib -L/usr/lib -llcms -ltiff -lfreetype -ljpeg
-lpng -ldpstk -ldps -lXext -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread
-lm -lpthread'],


This one surprises me, generally there will be a libjpeg.so, etc. in a
library path.  You need to make sure the path to the .so files is
included in the list above, which I would have thought they would be in
/usr/local/lib based on your include path, but if they come with the dev
tools in OS X then god knows where it puts them.  On linux for instance
there is a ld.so.conf that specifies what directories to include when
looking for the shared libs. There should be something similar assuming
gcc is being used.  Alternatively you can specify these types of paths
either in an ENV variable, LD_LIBRARY_PATH for instance, but I don't
know precisely off the top of my head, usually I guess my way through it
:-).

> 
> Can someone tell me which paths I should enter to successfully compile
PerlMagick? I did not find something like "ltiff" or "ljpeg", but the
convert tool works fine with these formats.
> 

You won't (likely) find an ltiff path, instead it will be libtiff.so or
some such.  Look for the shared lib files and see if you can add the
paths to them to the above switches.  

Good luck,

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to