Skip to content

mbrlabs/pixl

Repository files navigation

pixl

pixl is a lightweight image processing library, written in C++11.

The main goals of this project are ease of use and performance. Image decoding/encoding is done by third party libraries. Currently supported image formats are: png and jpeg.

There are also APIs for C, Python and Go.

Usage

#include <pixl/pixl.h>

int main() {
	// Resize image
	auto image = pixl::read("path/to/image.png"); 
	image->resize(256, 256);
	pixl::write(image, "path/to/small_image.png");

	return 0;
}

Transformations & Filters

  • Resize
    • Nearest Neighbor
    • Bilinear
    • Bicubic
    • Lanczos2
    • Lanczos3
  • Flip
    • Horizontally
    • Vertically
  • Crop
  • Rotate
  • Grayscale
  • Invert
  • 3x3 Convolution Matrix

Dependencies

The following libraries must be on the system:

Additionally i use Catch for unit testing.

Building

You need CMake to build the library with all examples and tests.
You also need a C++11 compatible compiler.

While the code should work on all major platforms, the only supported OS so far is Linux. Pixl compiles successfully on:

  • Linux Mint 17.3
  • Arch Linux

Building on Linux

mkdir build && cd build
cmake ..
make

Packaging

Arch Linux

There is a working PKGBUILD in pkg/arch. Once this project leaves the alpha stage i will submit it to the AUR.

Debian/Ubuntu

TBD