pixl
pixl copied to clipboard
:rocket: Lightweight image processing library in C++11
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
- [x] Nearest Neighbor
- [x] Bilinear
- [ ] Bicubic
- [ ] Lanczos2
- [ ] Lanczos3
- [x] Flip
- [x] Horizontally
- [x] Vertically
- [ ] Crop
- [ ] Rotate
- [x] Grayscale
- [x] Invert
- [x] 3x3 Convolution Matrix
Dependencies
The following libraries must be on the system:
- libpng for png decoding & encoding
- libjpeg-turbo for fast jpeg decoding & encoding
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