Page 1 of 2
Which binary should I use?
Posted: 2006-12-20T16:29:03-07:00
by firewood
As one might see from my previous posts, I am trying to install IM on a local site at a shared server. It is proving to be a pain, and I am not getting cooperation from my web host.
I tried the rpm - no luck - dependency problems.
I am looking at the instructions at the IM website for installing binaries, specifically the page,
http://www.imagemagick.org/script/binar ... s.php#unix
There are binaries for MAC, Solaris, BSD, and Cygwin; but I am installing on a Linux server (Red Hat). The instructions use as an example a generic file name, "ImageMagick.tar.gz". Can I use any of the files? None? Something else?
Any help will be greatly appreciated.
Posted: 2006-12-20T16:36:02-07:00
by anthony
RPM dependancy problems are usally not really dependancy problems under linux, and Im has enough 'smarts' to handle missing delegates.
As such if you don't want to handle the dependancy, (as it is for a delegate), you can force the install with...
rpm -Uhv --force --nodeps ~/dl/ImageMagick-*.i386.rpm
NOTE: the IM perlmagick may need some 'tweeking' so that an older version of perl will find the IM perl modules. I usablly do something like this, which was to move Im perl 5.8.7 modules into the installed perl 5.8.6 module area (once only as root). Check each step carfully...
Code: Select all
# IM Perl version fix (Fedora Core 4 - once only)
cpdir /usr/lib/perl5/vendor_perl/5.8.7/ /usr/lib/perl5/vendor_perl/5.8.6/
rm -r /usr/lib/perl5/vendor_perl/5.8.7
ln -s 5.8.6 /usr/lib/perl5/vendor_perl/5.8.7
the last symbolic link is so new Perlmagick installs and upgrades also get installed in the right place. No gurantees.
Posted: 2006-12-20T17:37:51-07:00
by firewood
Anthony,
I saw your other post, in which you indicated that I need root access. I do not have that. Are you saying in this post that if I force the installation without dependencies, that it will install locally without root access?
Posted: 2006-12-20T17:42:38-07:00
by firewood
Incidentally, here are the error messages I got when I ran the regular rpm command:
rpm -Uvh ImageMagick-6.3.1-2.i386.rpm
error: Failed dependencies:
libgs.so.8 is needed by ImageMagick-6.3.1-2.i386
libgvc.so.2 is needed by ImageMagick-6.3.1-2.i386
liblcms.so.1 is needed by ImageMagick-6.3.1-2.i386
libpng12.so.0(PNG12_0) is needed by ImageMagick-6.3.1-2.i386
librsvg-2.so.2 is needed by ImageMagick-6.3.1-2.i386
libwmflite-0.2.so.7 is needed by ImageMagick-6.3.1-2.i386
rtld(GNU_HASH) is needed by ImageMagick-6.3.1-2.i386
Suggested resolutions:
/home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/librsvg2-2.8.1-1.el4.1.i386.rpm
/home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/libwmf-0.2.8.3-5.3.i386.rpm
Posted: 2006-12-20T17:47:53-07:00
by anthony
RPM's can only really be installed with root.
The only other alturnative is to build a personal version, which has been described on in another forum thread. You will need to watch out about which library calls to your version makes, so you may need to wrapper applicatiosn with LD_LIBRARY_PATh environment settings.
From the errros i would guess that the RPM version was built on a much more advanced machine than what you have. You will have to build you own.
Posted: 2006-12-20T17:59:49-07:00
by firewood
Anthony,
I have a personal laptop with Ubuntu Linux installed, and on it is a version of ImageMagick that correctly delivers the histogram that I want. Can I use the binaries from my laptop, and upload them to my web directory?
I guess what I am asking is - are the IM binaries, once compiled, swapable from Linux to Linux?
Posted: 2006-12-20T18:31:49-07:00
by anthony
In general yes, but only from linux type to linux type.
EG ubuntu to ubuntu. I would not use a fedora to unbuntu (or visa versa) binary.
The main problme is that it is not just the command but the libraries, and library paths.
Make sure you also pass the library, and that teh command finds the right library.
Check it with ldd command
You may need to asjust the LD_LIBRARY_PATH to get the right library to be used, especally if the libraries location is different on the new machine.
I still think building your own version on the destination machien may be better.
But try the transfer and see how it goes.
Posted: 2006-12-20T18:45:45-07:00
by magick
For a user installed version of ImageMagick, the best solution may be to build ImageMagick from source. Download, unpack, and type
- ./configure --disable-installed
make
Install successful - but problem not solved!!
Posted: 2006-12-20T19:27:35-07:00
by firewood
My webhost gave me some help on this. He sent me a script to download and install IM locally. Here it is:
mkdir $HOME/src
cd $HOME/src
wget
ftp://ftp.imagemagick.org/pub/ImageMagi ... ick.tar.gz
tar zxvf ImageMagick.tar.gz
rm -f ImageMagick.tar.gz
cd ImageMagick-*/
./configure --with-magick-plus-plus=no --with-perl=no --disable-static --with-modules --prefix=$HOME/apps
make
make install
I used it (substituting the generic filename with the recent IM release - ImageMagick-6.3.1-2.tar.gz. It installed smoothly and without errors.
Now here is the kicker. - When I ran the same command as before from the command line:
./apps/bin/convert img*palette.gif histogram:hist_palette.txt
the "hist_palette.txt" file again is still almost all black pixels!!! This is exactly the same problem that started this thread. My image has a lot of color. It seems to me this must be a problem with IM.
The problem is not solved. Perhaps someone there should try running this command on your current version of IM and see what happens.
Posted: 2006-12-20T19:41:26-07:00
by anthony
Use ldd on the comannd and see what library was used!!!!
Now try
Code: Select all
env LD_LIBRARY_PATH="$HOME/apps/lib:$LD_LIBRARY_PATH" \
ldd ./apps/bin/convert
Is it not using the right library?
If so you need to change the search path for libraries to use your IM comamnds.
OR try adding some extra build flags to the configure...
Code: Select all
env LDFLAGS="-L $HOME/apps/lib -R $HOME/apps/lib" \
.configure ....
Let us know the results, I am making notes for future reference.
Posted: 2006-12-20T19:50:51-07:00
by firewood
Anthony,
O.K. I'll give it a try, but first, would someone there try the "convert image.gif histogram:image_hist.txt" command on a colorful image and just confirm that the problem is not with IM?
Posted: 2006-12-20T20:12:54-07:00
by magick
This command:
produces a count of each unique color in the image. The histogram image type produces a histogram image with the unique color count as an image comment. So if you say 'histogram:image_hist.txt' you are getting the pixel values of the histogram image, not the unique color count. Try, for example, 'histogram:image_hist.gif' and display image_hist.gif to see what a histogram image looks like. You'll see there is alot of black as expected.
Posted: 2006-12-20T20:21:17-07:00
by anthony
Oh... not a built problem then...
to get a text histogram use....
convert image.png -format %c histogram:info:-
This returns the histogram 'comment' that that image output operator adds to the graph image it generates.
See IM Examples
http://www.cit.gu.edu.au/~anthony/graph ... #histogram
Posted: 2006-12-20T20:52:06-07:00
by firewood
This must have changed recently, then, because on my Linux machine at home, which runs IM version 6.2.4, the command using histogram:image_hist.txt gives a nice "Comment" array at the top, consisting of the color count for each pixel color.
"identify -verbose" does not give a count of the pixels on my installation, just a list of the different colors in the image.
Posted: 2006-12-20T20:55:51-07:00
by anthony
For that version you should be using...
Code: Select all
convert image.png histogram:- | identify -format %c -