Boost.GIL Examples
This directory contains
- examples of C++ programs using GIL
- configuration files for Boost.Build command line and CMake integration for popular IDEs.
We provide Boost.Build (Jamfile) and CMake (CMakeLists.txt)
configurations to build the examples.
See the CONTRIBUTING.md
for details on how to run b2 and cmake for Boost.GIL.
Each example is build as a separate executable.
Each executable generates its output as out-<example_name>.jpg.
For example, the resize.cpp example generates the image out-resize.jpg.
The following C++ examples are included:
-
resize.cppScales an image using bilinear or nearest-neighbour resampling. -
affine.cppPerforms an arbitrary affine transformation on the image. -
convolution.cppConvolves the image with a Gaussian kernel. -
mandelbrot.cppCreates a synthetic image defining the Mandelbrot set. -
interleaved_ptr.cppIllustrates how to create a custom pixel reference and iterator. Creates a GIL image view over user-supplied data without the need to cast to GIL pixel type. -
x_gradient.cppHorizontal gradient, from the tutorial -
histogram.cppAlgorithm to compute the histogram of an image -
packed_pixel.cppIllustrates how to create a custom pixel model - a pixel whose channel size is not divisible by bytes. -
dynamic_image.cppExample of using images whose type is instantiated at run time.