At 2:01 -0500 21/5/02, [EMAIL PROTECTED] wrote: >I took a couple passes at trying to get Image::Magic to compile, I >finally had minor success by directly installing the binaries from >imagemagick.org. > Now it seems to run at the command line but I can't get Perl to >recognize it. Anyone been through this config before? I'm getting >lost.
I eventually got it to work before, but now I've updated and all is lost again :-( I've included my old instructions below, they might still be made to work if you aren't falling off the bleeding edge like me ;-) But it sounds a bit like it is just Perl not finding the ImageMagick.pm file - perhaps you should figure out where that is installed and do a perl -V and ensure the relevent directory is included in your INC path? 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>