Locked History Actions

DeepZot/Imengine/Install

Installing the imengine package

Pre-requisites

The following standard packages are required for building imengine:

There is also optional support for saving images in png format, which requires:

  • libpng (portable network graphics)

  • zlib (image compression)

If you are not sure if these are available, just go ahead with the next step which will check for these libraries in standard places.

Download

To download the package, you can either checkout the code using git (recommended for keeping up to date and contributing, but requires that you have installed git):

git clone git://github.com/deepzot/imengine.git
cd imengine

Otherwise, download and unpack a tagged or snapshot tarfile, for example:

curl -k -L https://github.com/deepzot/imengine/tarball/master | tar zx
cd deepzot-imengine-*

Configure and Build

The package uses the GNU autoconf/automake tools for portable installation on most platforms:

cd build
../configure
make

You should now have the library and programs built in the current build directory. Try the following and view the created 256x256 pixel stamp.png image:

./imgenerate -n 256 --src "exp[48]%{0.1,-0.2}" --psf "moffat[16,3]%{0.2,0.1}" -o stamp.png

If you do not want png output (or do not have zlib or libpng installed), add the --without-png option to the configure command above and replace stamp.png with stamp.dat to export pixel values to a text file.

Install to System Directories

Unless you will always be working within the install directory, it is convenient to install the packages programs (just imgenerate so far), library (static and shared), and public header files into a standard system directory where other users and projects can access them:

sudo make install

This will copy files into <prefix>/bin, <prefix>/lib, and <prefix>/include where, by default, <prefix> is /usr/local but you can customize this using the --prefix=... option to configure.

To use the library from other C++ projects, add the master header to your source files:

#include "imengine/imengine.h"

and add -limengine to your link command.