Installing smc.freeimage
========================

.. contents::
..
   1  Requirements
   2  Installation
   3  Static build


Requirements
------------

- Python 2.6, 2.7, 3.2 or newer

- Cython 0.16  http://cython.org/

- FreeImage 3.15.3  http://freeimage.sourceforge.net/

- LCMS 2.3  http://www.littlecms.com/

- C99 compatible C compiler or VS 2008+


Installation
-------------

$ python setup.py install


Static build
------------

smc.freeimage supports static linking against libfreeimage.a and liblcms2.a.
In order to create a static build you have to compile LCMS2 with::

  ./configure --with-pic --enable-static && make

Then copy `lcms2-2.3/src/.libs/liblcms2.a`, `lcms2-2.3/include/lcms2.h`,
`FreeImage/Dist/libfreeimage.a` and `FreeImage/Dist/FreeImage.h` into the `static`
folder of the project and run::

  $ python setup.py install --static


FreeImage-turbo
---------------

smc.freeimage's JPEG performance can be greatly enhanced with FreeImage-turbo,
a fork of FreeImage with libjpeg-turbo instead of libjpeg. The fork is
available at https://bitbucket.org/tiran/freeimageturbo . Static builds with
libfreeimageturbo.a are supported, too.
