Introduction | Installation | Format handlers | External libraries |
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.
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-shared | Force the creation of static libraries. | |
--disable-stubs | Disable 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.
By default only libimg1.2.so will be built. Further on:
make | build libimg1.2.so only | |
make z | build libz.so.1.1.3 | |
make png | build libpng.so.2.1.0.7 | |
make jpeg | build libjpeg.so.62.0.0 | |
make tiff | build libtiff.so.3.5.5 | |
make all | build all of above | |
make test | run 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.
You can install whatever you like:
make install | install libimg1.2.so only | |
make install-z | install libz.so.1.1.3 | |
make install-png | install libpng.so.2.1.0.7 | |
make install-jpeg | install libjpeg.so.62.0.0 | |
make install-tiff | install libtiff.so.3.5.5 | |
make install-all | install all of above |
If you want to use the new image formats to be available in your own scripts, add the following line somewhere in your script:
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"