>after a few false starts, i've got imagemagick working, or rather fink has.
>i was initially reluctant to install all the bits of X11 that it 
>insists on, but while i succeeded in installing imagemagick from 
>source, i could never get it to link to fink's libjpeg. so i've 
>stopped fighting it and now it's working perfectly, from the command 
>line at least.

Yeah, this is what mucked me around before (see my post below on how 
I got around it, eventually).

>problem is, the version of PerlMagick i installed before is more up 
>to date than Fink's imagemagick, and seems to be upset. IM is 
>finally working on jpegs, but i can't get at it with perl any more :(

One possibility is to rebuild your location database, do a locate 
Magick and then just delete everything in your installed directories 
that match and start again (worked for me anyway).  You might want to 
ask fink to uninstall it first and then just use the above technique 
to get rid of any stragglers.

Fun fun fun,
    Peter.


Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
List-Post: <mailto:[EMAIL PROTECTED]>
List-Help: <mailto:[EMAIL PROTECTED]>
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
List-Subscribe: <mailto:[EMAIL PROTECTED]>
Mime-Version: 1.0
X-Sender: peter@pop
Date: Fri, 12 Apr 2002 17:07:11 +0800
To: MacOSX Perl <[EMAIL PROTECTED]>
From: Peter N Lewis <[EMAIL PROTECTED]>
Subject: Getting ImageMagick/PerlMagick to work

Hi all,

I finally got ImageMagick to install and work for me, perhaps this 
will help someone else...

I think pert of the problem might be that I have perl 5.6.1 installed.

Anyway, I eventually got it to install by using fink, but then it 
failed because it wanted _ParseGeometry, which I think is some sort 
of X windows thing, so I rebuilt it using:

fink fetch imagemagic

edit 
/sw/fink/dists/stable/main/finkinfo/graphics/imagemagick-5.4.1-3.patch 
and add a line to disable X windows support (add the line with_x=no, 
and change the 27 to 28 on the first line of the patch hunk).

@@ -7720,6 +7720,28 @@
      # FIXME: insert proper C++ library support
      ld_shlibs_CXX=no
      ;;
+  darwin* | rhapsody*)
+    case "$host_os" in
+    rhapsody* | darwin1.[012])
+      allow_undefined_flag_CXX='-undefined suppress'
+      ;;
+    *) # Darwin 1.3 on
+      allow_undefined_flag_CXX='-flat_namespace -undefined suppress'
+      ;;
+    esac
+    with_x=no
+
+    # FIXME: Relying on posixy $() will cause problems for
+    #        cross-compilation, but unfortunately the echo tests do not
+    #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
+    #        `"' quotes if we put them in here... so don't!
+    archive_cmds_CXX='$CC $(test .$module = .yes && echo -bundle || 
echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs 
$deplibs$linker_flags -install_name $rpath/$soname $verstring'
+    # We need to add '_' to the symbols in $export_symbols first
+    #_LT_AC_TAGVAR(archive_expsym_cmds, 
CXX)="$_LT_AC_TAGVAR(archive_cmds, CXX)"' && strip -s $export_symbols'
+    hardcode_direct_CXX=yes
+    hardcode_shlibpath_var_CXX=no
+    whole_archive_flag_spec_CXX='$convenience'
+    ;;
    aix4* | aix5*)
      if test "$host_cpu" = ia64; then
        # On IA64, the linker does run time linking by default, so we don't


After that just continue with the install

fink build imagemagic
fink install imagemagic

(you might have to do the build/install first to generate the patch 
file in the first place, I don't know where it came from).

Also, I found that "new Image::Magick" didn't work, but 
Image::Magick->new does.  This code now works for me:

use Image::Magick;

$image=Image::Magick->new;
$x = $image->Read( filename=>'/Users/peter/unix/game-org.jpg' );
warn "$x" if "$x";
$x = $image->Resize( geometry=>'640x480' );
warn "$x" if "$x";
$x = $image->Write( filename=>'/Users/peter/unix/game-out2.jpg', quality=>75 );
warn "$x" if "$x";
$x = $image->Resize( geometry=>'64x48' );
warn "$x" if "$x";
$x = $image->Write( filename=>'/Users/peter/unix/game-out2.gif' );
warn "$x" if "$x";
@$image = ();

Which is pretty cool if you want to generate web images or thumbs 
from large originals for example...

Hope this is useful.  Won't it be nice in a year or so when all this 
stuff just works out of the box!
    Peter.
--
<http://www.interarchy.com/>  <ftp://ftp.interarchy.com/interarchy.hqx>

-- 
<http://www.interarchy.com/>  <ftp://ftp.interarchy.com/interarchy.hqx>

Reply via email to