nip 7.8 source and documentation 
================================

nip (new ip) is a user interface for the VIPS image processing library. 

To start nip, run the "run-nip.sh" script from the bin area. This script
figures out where it's been installed, sets the appropriate environment
variables, and starts the executable.

You can speed up startup by running the binary directly if you set your
library path (or edit ld.so.conf, or whatever is appropriate for your
machine) yourself.

Building from source
====================

You need to build and install the VIPS library, and it's easiest if you have 
the VIPS bin area on your path. Type:

	user% vips-config --version

and make sure it prints the version number of the one you installed 

You should just be able to do:

	user% ./configure --prefix=`vips-config --prefix`
	user% make

Then either yourself or root (depending on where you are installing to):

	user% make install

MSC toolchain
-------------

There are a set of makefiles and icons in nip-7.8.x/proj, no support though.

mac os x
--------

	CFLAGS="-no-cpp-precomp" ./configure ...

mingw (windows native)
----------------------

	- edit xml2-config ... change the prefix, remove -lMstubs etc

	- make a gtk+.pc to help nip's configure

		cd /mingw/lib/pkgconfig
	    	cp gtk+-1.3-win32-production.pc gtk+.pc

	- also set bitfields

	    export CFLAGS="-mms-bitfields -O2" 

	  needed for link to pre-built gtk libs

	- install gtkextra, make a .pc for it (copy and tweak the gtk one),
	  point GTKEXTRA_CONFIG at it

	    export GTKEXTRA_CONFIG="/mingw/bin/pkg-config gtkextra-0.99"

	- point PKG_CONFIG_PATH at where you installed vips, so nip can
	  find it

	    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

	- summary

	    export GTKEXTRA_CONFIG="/mingw/bin/pkg-config gtkextra-0.99"
	    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
	    CFLAGS="-mms-bitfields -O2" ./configure 

Dependencies
------------

You need:

VIPS
	You need version 7.8.10 or later. Download and install from:

		http://www.vips.ecs.soton.ac.uk

	See the VIPS README for details.

gmake
	You need GNU make. 

glib/gtk+
	You need 1.2 or later of these packages.

	VIPS will normally automatically find gtk/glib libraries and
	headers. If configure chooses the wrong version (or can't find it), 
	use the "--with-gtk-prefix" options to specify exactly which one you 
	want. 

	If necessary, download from:
	
		http://www.gtk.org

	or on Linux, install the gtk-devel package from your distribution CDs.

	gtk-config can add "-L/usr/lib" to the link line, which can cause
	breakage. This is a bug in some versions of gtk. Edit gtk-config to
	remove this and try reconfiguring.

libxml2
	You need version 2.0 or later of libxml2.

	If necessary, download from:
	
		http://www.libxml.org

	or on Linux, install the libxml2-devel package from your distribution 
	CDs.

	xml2-config can add -L/lib to the libs, which will cause link
	problems. If you have link errors, check this.

Static link
-----------

Edit src/Makefile, look for LDADD, and swap for something like:

LDADD = \
	-I/usr/include/libxml2/libxml -I/usr/include/libxml2 \
	-I/usr/local/include/gtk-1.2 -I/usr/include/glib-1.2 \
	-I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/local/include \
	-I/home/john/vips/include  \
	/usr/lib/libxml2.a \
	/usr/local/lib/libgtkextra.a \
	/usr/local/lib/libgtk.a \
	/usr/local/lib/libgdk.a \
	-rdynamic \
	/usr/local/lib/libgmodule.a \
	/usr/local/lib/libglib.a \
	-L/usr/X11R6/lib -lXext -lX11 \
	/home/john/vips/lib/libvips.a \
	-ltiff -lz -ljpeg \
	/usr/lib/libdfftw.a \
	/usr/lib/liblcms.a \
	-lm -ldl

Disclaimer: No guarantees of performance accompany this software, nor is any
responsibility assumed on the part of the authors. Please read the licence
agreement.

