About Picaxo 2

Over the course of a week in March 2008, I wrote the Picaxo Image Viewer in C using the SDL library. Picaxo was a lightweight image viewer inspired by Irfanview but designed to be cross-platform.

Picaxo 2 (this project) is a rewrite of Picaxo using C++ and SDL2. It was mainly written between 12th-16th January 2016. Picaxo 2 is being developed mainly on Windows using Visual Studio 2015, but it has also been tested on Linux and Mac.

Download

A release candidate for Windows is available. You can get it from the downloads page.

Contribute

I'm not mainly a C++ developer, and I'm not an image processing expert either. As such, the following help is greatly appreciated:

Code review. Help identify design flaws and improve maintainability of the software.

Testing. Find bugs and help to fix them.

Additional filters. Add new features to the software.

I can be contacted via my website/blog, Gigi Labs.

Thanks

I would like to thank:

All the people at the SDL Development forum for answering my questions.

Lode Vandevenne for his excellent Image Filtering article.

Andrew Buttigieg for testing Picaxo 2 on Mac.

Screenshots

How it works

SDL2 infrastructure and basic filters are based on my SDL2 articles.

Undo/redo history uses a simple intrusive list implementation, inspired by an article by Patrick Wyatt of Blizzard fame.

Convolution-based filters are based on the excellent Image Filtering article by Lode Vandevenne.

Features

Supports loading BMP, PNG, JPG, GIF, TIF, TGA, PCX, PPM, PBM, PGM, and WEBP formats

Save image (BMP or PNG, fixed filename)

Basic filters: grayscale, negative, flip horizontal/vertical, rotate right/left

Convolution filters: blur, sharpen, edge detection, emboss, mean filter, motion blur

History: undo/redo

Full screen

Limitations

Images that exceed the maximum texture dimensions of your graphics card cannot be opened. These are typically 8192x8192 for older devices, or 16384x16384 for the newer ones (reference).

Dropped

The following features were supported by the original Picaxo but are not planned to be implemented in Picaxo 2.

URL filenames. The original Picaxo could take either a local filename or a URL, and in the latter case, the image would be downloaded via HTTP. Image retrieval is not within the intended scope of Picaxo 2.

Sandstorm filter. This was originally a programming accident with a pretty effect. It is not planned for Picaxo 2.

Future Development

The following are things I would like to add to Picaxo 2:

More image filters.

Clipboard support. Not easy since SDL2 doesn't have anything standard for images so it will require OS-specific code.

Selection. It would be nice if we can apply effects to regions of the image as opposed to the whole image.

Drawing. Basic drawing functionality could be useful (low priority though).

Usage

Windows

picaxo filename

Linux

./picaxo filename

Keyboard Commands

Application commands

s - save PNG (picaxo_out.png)

Ctrl + s - save BMP (picaxo_out.bmp)

Ctrl + z - undo

Ctrl + y - redo

f - full screen

ESC - quit

Basic filters:

g - convert to grayscale

n - convert to negative

h - flip horizontal

v - flip vertical

r - rotate right

l - rotate left

Convolution filters:

b - blur

p - sharpen

Ctrl + b - motion blur

e - edge detection

Ctrl + e - emboss

m - mean filter

Compiling Picaxo 2

Windows

To build:

Set up SDL2 with Visual Studio 2015. Header files are expected to be in an SDL2 folder, e.g. SDL2/SDL2.h. Adjust accordingly. Set up SDL_image. Build using Visual Studio.

After building:

Copy the pcxico32.png file from the img folder and put it in the output folder. This allows the program to set the application icon. The program will still work if you forget to do this, but it will have no application icon. Add the following SDL2 runtime libraries to your output folder: SDL2.dll, SDL2_image.dll, libfreetype-6.dll, libjpeg-9.dll, libpng16-16.dll, libtiff-5.dll, libwebp-4.dll, zlib1.dll. Right click on project, select Properties. In Debugging section, enter a value for "Command Arguments" that corresponds to the file path of the image that you want to test with.

Linux

First, install the development libraries you need.

sudo apt-get install build-essential sudo apt-get install libsdl2-dev sudo apt-get install libsdl2-image-dev

Get the source and build it: