Which binary should I use?
Which binary should I use?
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.
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.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
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...
the last symbolic link is so new Perlmagick installs and upgrades also get installed in the right place. No gurantees.
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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
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
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
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
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.
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
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?
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?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
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.
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Install successful - but problem not solved!!
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.
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.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Use ldd on the comannd and see what library was used!!!!
Now try
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...
Let us know the results, I am making notes for future reference.
Code: Select all
ldd ./apps/bin/convert
Code: Select all
env LD_LIBRARY_PATH="$HOME/apps/lib:$LD_LIBRARY_PATH" \
ldd ./apps/bin/convert
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 ....
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
This command:
- identify -verbose logo:
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
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
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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
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.
"identify -verbose" does not give a count of the pixels on my installation, just a list of the different colors in the image.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
For that version you should be using...
Code: Select all
convert image.png histogram:- | identify -format %c -
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/