Sunday, March 3, 2013

Netpbm pnmscale install


NetPBM, ImageMagick and GD are softwares that are used create, edit, compose images file such as jpeg, jpg, gif, bitmap etc.

Binary of ImageMagick
# /usr/bin/convert --version
Version: ImageMagick 6.7.5-6 2012-02-20 Q16 http://www.imagemagick.org

Binary of NetPBM
# /usr/bin/pnmscale --version
pnmscale: Using libnetpbm from Netpbm Version: Netpbm 10.35.84

Binary of GD
There is no specific binary for GD as it is compiled into the php. However there are certain image conversion binaries that gets installed, when we install GD on server.

# /usr/bin/gdlib-config --features
GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF
How to check if GD library is present on the server You can easily check which GD library version your server?
Make a phpinfo.php page


Install NetPBM
cd /usr/src
wget netpbm-10.35.84.tgz
tar -zxf netpbm-10.35.84.tgz
cd netpbm-10.35.84
./configure
You will get many questions, just press enter for all.
After configure is completed, install in on a new directory
make package pkgdir=/usr/local/netpbm/
Install Netpbm after that
./installnetpbm
Press enter for the questions
You can see it gets installed in /usr/local/netpbm/bin/pnmscale


root@newserver [/]# /usr/local/netpbm/bin/pnmscale --version
pnmscale: Using libnetpbm from Netpbm Version: Netpbm 10.35.84
Make symlinks for libs
ln -s /usr/local/netpbm/lib/libnetpbm.so.10 /usr/lib/
ln -s /usr/local/netpbm/lib/libnetpbm.so.10 /usr/local/lib/
ln -s /usr/local/netpbm/lib/libnetpbm.so.10 /usr/lib64/libnetpbm.so.10 --> If 64 bit server
Copy all binary files to /usr/bin
cp /usr/local/netpbm/bin/* /usr/bin/

If any php script or issue isnot fixed, try copying to /usr/local/bin too, as the path the script checks for binary will be /usr/local/bin
cp /usr/local/netpbm/bin/* /usr/local/bin/
Check if working fine.
root@newserver [/]# pnmscale --version
pnmscale: Using libnetpbm from Netpbm Version: Netpbm 10.35.84

No comments:

Post a Comment