Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / gil / example / README.md
1 # Boost.GIL Examples
2
3 This directory contains
4
5 - examples of C++ programs using GIL
6 - configuration files for CMake integrations in popular IDEs
7
8 We provide Boost.Build (`Jamfile`) and CMake (`CMakeLists.txt`)
9 configurations to build the examples.
10 See the [CONTRIBUTING.md](../CONTRIBUTING.md)
11 for details on how to run `b2` and `cmake` for Boost.GIL.
12
13 Each example is build as a separate executable.
14 Each executable generates its output as `out-<example_name>.jpg`.
15 For example, the `resize.cpp` example generates the image `out-resize.jpg`.
16
17 The following examples are included:
18
19 1. `resize.cpp`
20    Scales an image using bilinear or nearest-neighbour resampling.
21
22 2. `affine.cpp`
23    Performs an arbitrary affine transformation on the image.
24
25 3. `convolution.cpp`
26    Convolves the image with a Gaussian kernel.
27
28 4. `mandelbrot.cpp`
29    Creates a synthetic image defining the Mandelbrot set.
30
31 5. `interleaved_ptr.cpp`
32    Illustrates how to create a custom pixel reference and iterator.
33    Creates a GIL image view over user-supplied data without the need to cast to GIL pixel type.
34
35 6. `x_gradient.cpp`
36    Horizontal gradient, from the tutorial
37
38 7. `histogram.cpp`
39    Algorithm to compute the histogram of an image
40
41 8. `packed_pixel.cpp`
42    Illustrates how to create a custom pixel model - a pixel whose channel size is not divisible by bytes.
43
44 9. `dynamic_image.cpp`
45    Example of using images whose type is instantiated at run time.