Img Manual

Introduction Installation Format handlers External libraries

Installation

For Windows, just run the executable.

For UNIX, you have to compile the sources yourself, but that shouldn't give you many problems. In the future, hopefully, binary distributions for various UNIX systems will become available as well.

Configure

The source distributions have "configure", which has the following possibilities:

 configure ?options?
Some possible options:
 --prefix=<dir>Install headers in <dir>/include.
Default: "/usr/local"
 --exec-prefix=<dir>Install libraries in <dir>/lib.
Default: "${prefix}"
 --with-tcl=<dir>Find Tcl libraries in <dir> and include files in <dir>/../include or <dir>/../generic.
Default: "${exec-prefix}/lib" or a sibling directory of the Img build directory.
 --with-tk=<dir>Find Tk libraries in <dir> and include files in <dir>/../include or <dir>/../generic.
Default: the same values as given by --with-tcl or a sibling directory of the Img build directory.
 --disable-sharedForce the creation of static libraries.
 --disable-stubsDisable stub support. This is necessary if you want to run Img 1.2 with Tcl/Tk 8.0 up to 8.0.5.

Configuration of libz, libpng, libtiff, libjpeg and libttf will be done automatically.

make

By default only libimg1.2.so will be built. Further on:

 makebuild libimg1.2.so only
 make zbuild libz.so.1.1.3
 make pngbuild libpng.so.2.1.0
 make jpegbuild libjpeg.so.62.0.0
 make tiffbuild libtiff.so.3.5.4
 make allbuild all of above
 make testrun tests for all image formats.

Best is to start with "make". If a test fails for one of the PNG, JPEG or TIFF formats, the error message will indicate what is wrong. If a library is missing in your system, you can always build it later. If a crash occurs, this might also indicate that you better upgrade one of these libraries.

If you prefer to use different versions numbers after the extension, you can manually adapt the Makefile. On Irix, you can use the "ifl" libraries which are already part of the operating system. The top of the Makefile shows which file names to use.

Install (source distributions only)

You can install whatever you like:
 make installinstall libimg1.2.so only
 make install-zinstall libz.so.1.1.3
 make install-pnginstall libpng.so.2.1.0
 make install-jpeginstall libjpeg.so.62.0.0
 make install-tiffinstall libtiff.so.3.5.4
 make install-allinstall all of above

Use

If you want to use the new image formats to be available in your own scripts, add the following line somewhere in your script:

package require Img

This will load the library into memory and register the format handlers into Tk.

As an example, have a look at the file "demo.tcl"