Download and run the installer that best fits your system (32bit or 64bit).

Older versions are available on Google Code. Because Google does not allow new uploads anymore the installers starting from January 2014 are available from Bitbucket.

Photivo for Windows has a portable mode. See below for more information.

Portable Mode

Portable mode makes it possible to carry Photivo around on a USB drive or SD card by keeping all program files and settings together in one place.

To enable portable mode create a file called use-portable-profile (just like this, no file extension) in Photivo’s program folder (where photivo.exe is located). The content of that file is not important, it can be completely empty.

When use-portable-profile is present Photivo stores all user data (settings, presets etc.) inside its program folder instead of in your user application data folder.

Compiling Photivo

This section covers compiling 32bit and/or 64bit Photivo binaries on a Windows machine with MinGW.

This guide is maintained by Brother John.

The structure of the development environment is based on my current setup. If you’re interested in the details: I explain them in depth in the articles A Native Windows MinGW Ecosystem and Toolchain Installation Guide on

Looking for the old manual build instructions? See this older revision of this page. Keep in mind: Those instructions are outdated. You will not be able to build Photivo without problems that way.

Toolchain Setup

You can build Photivo and its dependencies as 64bit or 32bit versions. 64bit is highly recommended because Photivo needs a lot of memory. 32bit is a severe limitation in that regard. As a general rule you should only build 32bit Photivo when you are running a 32bit version of Windows. To find out go to Control Panel › System and there look for what it says under System type.

You only need to do the toolchain setup once. Every new version of Photivo can be built with the same toolchain. The only real reason to update is when the Photivo source code starts to use new C++ features that your current toolchain does not support yet. However, that happens extremely rarely.

Base Folder

For this guide I assume C:\tc (for toolchain) as the base folder for your whole build environment. The first step is to create this folder and to make sure it is empty.

If you do not want to use C:\tc for some reason that’s possible. Read the note below to make sure everything will work fine.


Installer download

MSys provides a Linux like shell on Windows. Since the whole toolchain is Linux stuff dragged over to Windows, life with MSys is a lot easier than using the native Windows shell.

Download and start the installer. Choose C:\tc\dev-tools\msys2 as the installation folder. Once the installer completes it opens an MSys console window. Type the following commands to update the core MSys components to the most recent version.

pacman -Sy
pacman --needed -S bash pacman msys2-runtime

When Pacman is finished:

  1. Close the MSys window.
  2. Run C:\tc\dev-tools\msys2\autorebase.bat. This is only required after an MSys core components upgrade. You don’t need to autorebase before each MSys start.
  3. Restart MSys via C:\tc\dev-tools\msys2\msys2_shell.bat.

Automated Setup

Download setup and build scripts

The rest of the installation is automated.

Download the zip archive from the link above and unzip it to C:\tc\dev-tools\msys2\opt\bin. Create that folder if necessary. The archive contains three scripts, two of which are interesting right now: One to complete the setup of MSys and one to install the MinGW compiler packages.

From the MSys window first run:


The script updates all remaining MSys components and installs several more that are needed when building Photivo and its dependencies. Then install MinGW 64bit and/or 32bit with:

/opt/bin/ 64 32

If you only want 64bit or 32bit remove the superfluos option from the command. Your choice is not final. E.g. if you install only 64bit now you can run again later and install 32bit as well.

After the script has finished installing, close the MSys window and restart it via C:\tc\dev-tools\startmsys.bat.

C:\tc\dev-tools\startmsys.bat is the official Photivo way to start MSys. Do not use msys2_shell.bat again, because it will not set up the toolchain environment correctly.

Switching Between Toolchains

If you have both 64bit and 32bit toolchains installed you can switch between them with the switchtc command. When MSys starts the 64bit toolchain is activated automatically. Use

switchtc gcc49 64


switchtc gcc49 32

to switch to 64bit and 32bit respectively.

Compiling Dependencies

Photivo relies on about a dozen 3rd party software packages, called dependecies, that need to be present to build Photivo itself. The third script from the archive you downloaded above ( automatically downloads, builds and installs all of them.

In an MSys window execute the script with:

/opt/bin/ full

The option full means to execute everything:

  1. Download and install all binary dependencies,
  2. download, build and install all source code dependecies.

Whenever an error occurs during executing of the script and you choose not to try the failed step again, the script tells you the appropriate option to start again from where things went wrong. For example:

Building libpng failed.
Do you want to try again? (y/n)n

You can restart the script at this section with: build-png

The script has a few options for experts: Run --help to see them.

Building Photivo

Finally you are ready to build Photivo itself. Everything is done in the MSys console. So first start MSys and switch to the correct toolchain, if necessary.

Gimp Plugin

Libgimp 2.8 dependecy: 64bit download | 32bit download

Building the Gimp plugin especially for the current Gimp version 2.8 is hardly tested at all. Only build it if you really need to and expect trouble along the way.

The plugin for The Gimp is completely optional. If you don’t use Gimp you don’t need the plugin and can simply ignore it. It is not compiled by default.

Download the libgimp archive that fits your toolchain (64bit or 32bit) and unpack it in MSys.

cd $devpath
7za x /path/to/archive.7z

The plugin is compiled together with Photivo in the next step.


First you need to clone the Photivo source code repository to your hard drive and update to the latest revision in the trunk.

cd $devpath/src
hg clone photivo
cd photivo
hg update default

Then compile. See below for Photivo specific qmake options.

mkdir _build
cd _build
qmake ../ CONFIG-=debug
make -j`nproc`

Photivo has some custom options that control which subprojects are compiled. Photivo itself is always compiled. Also enabled by default is ptClear, the mini tool to reset settings. Disabled are the Adobe profiles creator and the Gimp plugin. You can specify which subprojects to build by modifying qmake’s CONFIG variable. The qmake example below demonstrates all available options.

qmake CONFIG+=WithoutClear CONFIG+=WithGimp CONFIG+=WithAdobeProfiles ../

If you build a debug version of Photivo remove the CONFIG-=debug from the qmake call. That will also disable OpenMP and produce lots of compiler warnings. Don’t worry, that is normal behaviour – though not entirely intended … ;)

For later updates download the changes from the repository.

cd $devpath/src/photivo
hg pull
hg update default

Then compile as above.

cd _build
qmake ../ CONFIG-=debug
make -j`nproc`

Re-compiling all the dependencies every time is not necessary.

Binary Package for Photivo

Photivo needs a variety of libraries and other files and folders to run. To get a complete standalone Photivo you need to find all the pieces and copy them into a new folder.

64 bit

  • these files from the Photivo build folder $devpath/src/photivo/_build
    • photivo.exe
    • ptClear.exe
  • these subfolders from the Photivo project folder $devpath/src/photivo
    • ChannelMixers
    • Curves
    • LensfunDatabase
    • Presets
    • Profiles
    • Themes
    • Translations (only the *.qm files)
    • UISettings
  • these files from $devpath/qt/bin
    • Qt5Core.dll
    • Qt5Gui.dll
    • Qt5Network.dll
    • Qt5Widgets.dll
  • these files from $devpath/bin
    • libexiv2.dll
    • libexpat-1.dll
    • libfftw3-3.dll
    • libglib-2.0-0.dll
    • libGraphicsMagick++-3.dll
    • libGraphicsMagick-3.dll
    • libGraphicsMagickWand-2.dll
    • libiconv-2.dll
    • libintl-8.dll
    • libjpeg-9.dll
    • liblcms2-2.dll
    • liblensfun.dll
    • liblqr-1-0.dll
    • libpng16.dll
    • libtiff-5.dll
    • zlib1.dll
  • these files from $tcpath/bin
    • libgcc_s_seh-1.dll
    • libgomp-1.dll
    • libstdc++-6.dll
    • libwinpthread-1.dll

32 bit

  • these files from the Photivo build folder $devpath/src/photivo/_build
    • same as for 64 bit
  • these subfolders from the Photivo project folder $devpath/src/photivo
    • same as for 64 bit
  • these files from $devpath/qt/bin
    • same as for 64 bit
  • these files from $devpath/bin
    • intl.dll
    • libexiv2.dll
    • libexpat-1.dll
    • libfftw3-3.dll
    • libglib-2.0-0.dll
    • libGraphicsMagick++-3.dll
    • libGraphicsMagick-3.dll
    • libGraphicsMagickWand-2.dll
    • libiconv-2.dll
    • libjpeg-9.dll
    • liblcms2-2.dll
    • liblensfun.dll
    • liblqr-1-0.dll
    • libpng16.dll
    • libtiff-5.dll
    • zlib1.dll
  • these files from $tcpath/bin
    • libgcc_s_sjlj-1.dll
    • libgomp-1.dll
    • libstdc++-6.dll
    • libwinpthread-1.dll

Gimp plugin

  • ptGimp.exe (from the build folder)
  • QtCore5.dll

That’s it. You now have a complete Photivo Windows package.


Custom Base Folder

You can use a folder other than C:\tc as the base folder for the complete development environment. If you do:

  • Avoid special characters everywhere in the path. Especially spaces, those are definitely deadly.
  • The folder should be empty.

Also you need to tell the management scripts where to find the toolchains. Say your base folder is D:\Photivo\Toolchain. You need to define a new environment variable called tc_base_dir and set its value to the base folder path. Go to Control panel › System › Advanced System Settings › Advanced › Environment Variables. There click the New button to create a new user variable.

You may need to restart the computer for the changes to take effect. When starting MSys the toolchain setup will complain about missing folders. Do a

set|grep tc_base_dir

and check the output. It should contain the correct base folder in MSys notation, i.e.


If not, restart to make things work.

Version Info

The dependency build script uses the following software versions. Usually these are the same as in the current official Photivo Windows build.

Binary dependencies:

Library Version
GLib 2.26.1-1 (64bit)
2.28.8-1 (32bit)
Qt 5.4.0

Source code dependencies:

Library Version
zlib 1.2.8
libPNG 1.6.15
libJPEG 9a
libTIFF 4.0.3
LCMS2 2.6
libiconv 1.14
Expat 2.1.0
Exiv2 0.24
FFTW 3.3.4
GraphicsMagick 1.3.20
Liquid Rescale 0.4.2
Lensfun 0.2.8

Building debug libraries

You only might need debug libraries if you want to get involved in Photivo’s development (don’t hesitate!) or if you’d like to get really serious with finding bugs (don’t hesitate either!).

At the moment the dependency build script does not support debug builds. You’ll have to adapt it yourself or build the dependecies manually. However, debug libraries at not usually necessary to debug Photivo itself.

To enable debug symbols you pass the -g switch to gcc. Also you should disable optimizations. In MSys set your CFLAGS and CXXFLAGS accordingly:

export CFLAGS="$CFLAGS -O0 -g"
export CXXFLAGS="$CXXFLAGS -O0 -g"

For most of the libraries this is enough to enable debug support. There are some exceptions, though.


The makefile is hard coded to release and -O3 optimization. Edit win32/Makefile.gcc and:

  • Look for the debug LOC assignment (line 42 in version 1.2.8) and uncomment it.
  • A bit forther down in the CFLAGS assignment (line 46 in version 1.2.8) replace -O3 with -O0.

Save under a different filename and use that as the makefile for your debug build.

libPNG, Exiv2, Lensfun

When running cmake use -DCMAKE_BUILD_TYPE=debugfull instead of -DCMAKE_BUILD_TYPE=release.


Add --disable-openmp to the configure options, otherwise you might run into a segfault when debugging.