2
0
mirror of https://github.com/boostorg/gil.git synced 2026-01-19 04:12:11 +00:00

Update example/README.txt and convert to Markdown [ci skip]

Update README.md and CONTRIBUTING.md about available examples.

Clarifies #252 and #253
This commit is contained in:
Mateusz Łoskot
2019-03-06 19:21:22 +01:00
parent 9004a67662
commit ecf41b59ae
4 changed files with 56 additions and 52 deletions

View File

@@ -270,8 +270,8 @@ git push username feature/foo
## Development
Boost.GIL is a [header-only library](https://en.wikipedia.org/wiki/Header-only)
which does not require sources compilation. Only test runners and example
programs have to be compiled.
which does not require sources compilation. Only test runners and
[example](example/README.md) programs have to be compiled.
By default, Boost.GIL uses Boost.Build to build all the executables.
@@ -397,8 +397,9 @@ Here is an example of such lightweight workflow in Linux environment (Debian-bas
cmake ..
```
**TIP:** By default, tests and examples are compiled using the minimum required
C++11. Specify `-DCMAKE_CXX_STANDARD=14|17|20` to use newer version.
**TIP:** By default, tests and [examples](example/README.md) are compiled using
the minimum required C++11.
Specify `-DCMAKE_CXX_STANDARD=14|17|20` to use newer version.
For more CMake options available for GIL, check `option`-s defined
in the top-level `CMakeLists.txt`.
@@ -454,7 +455,7 @@ Maintainer: [@stefanseefeld](https://github.com/stefanseefeld)
[clang-tidy](http://clang.llvm.org/extra/clang-tidy/) can be run on demand to
diagnose or diagnose and fix or refactor source code issues.
Since the CMake configuration is provided for building tests and examples,
Since the CMake configuration is provided for building tests and [examples](example/README.md),
it is easy to run `clang-tidy` using either the integration built-in CMake 3.6+
as target property `CXX_CLANG_TIDY` or the compile command database which
can be easily generated.

View File

@@ -43,6 +43,11 @@ variety of images with performance similar to hand-writing for a specific image
- Latest release: https://boost.org/libs/gil
- Development: http://boostorg.github.io/gil/
See [CONTRIBUTING.md](CONTRIBUTING.md) for instructions about how to build and
run tests, examples.
See [example/README.md](example/README.md) for available GIL examples.
## Requirements
**NOTE:** The library source code is currently being modernized for C++11.
@@ -52,7 +57,7 @@ The Boost Generic Image Library (GIL) requires:
- C++11 compiler
- Boost header-only libraries
Optionally, in order to [build and run tests](#contributing-we-need-your-help) and examples
Optionally, in order to build and run tests and examples:
- Boost.Filesystem
- Boost.Test
@@ -84,8 +89,8 @@ If you would like to contribute to Boost.GIL, help us improve the library
and maintain high quality, there is number of ways to do it.
If you would like to test the library, contribute new feature or a bug fix,
see the [CONTRIBUTING.md](https://github.com/boostorg/gil/blob/develop/CONTRIBUTING.md)
where the whole development infrastructure and the contributing workflow is explained in details.
see the [CONTRIBUTING.md](CONTRIBUTING.md) where the whole development
infrastructure and the contributing workflow is explained in details.
You may consider performing code reviews on active
[pull requests](https://github.com/boostorg/gil/pulls) or help

42
example/README.md Normal file
View File

@@ -0,0 +1,42 @@
# Boost.GIL Examples
This directory contains GIL sample code.
We provide Boost.Build (`Jamfile`) and CMake (`CMakeLists.txt`)
configurations to build the examples.
See the [CONTRIBUTING.md](../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 examples are included:
1. `resize.cpp`
Scales an image using bilinear or nearest-neighbour resampling.
2. `affine.cpp`
Performs an arbitrary affine transformation on the image.
3. `convolution.cpp`
Convolves the image with a Gaussian kernel.
4. `mandelbrot.cpp`
Creates a synthetic image defining the Mandelbrot set.
5. `interleaved_ptr.cpp`
Illustrates 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.
6. `x_gradient.cpp`
Horizontal gradient, from the tutorial
7. `histogram.cpp`
Algorithm to compute the histogram of an image
8. `packed_pixel.cpp`
Illustrates how to create a custom pixel model - a pixel whose channel size is not divisible by bytes.
9. `dynamic_image.cpp`
Example of using images whose type is instantiated at run time.

View File

@@ -1,44 +0,0 @@
Copyright 2008 Lubomir Bourdev and Hailin Jin
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
This directory contains GIL sample code.
We provide a Makefile that compiles all examples. You will need to change it to specify the correct path to boost, gil, and libjpeg. Some of the examples include the GIL numeric extension, which you can get from:
http://opensource.adobe.com/gil/download.html
The makefile generates a separate executable for each test file. Each executable generates its output as "out-<example_name>.jpg". For example, the resize.cpp example generates the image out-resize.jpg
The following examples are included:
1. resize.cpp
Scales an image using bilinear or nearest-neighbor resampling
2. affine.cpp
Performs an arbitrary affine transformation on the image
3. convolution.cpp
Convolves the image with a Gaussian kernel
4. mandelbrot.cpp
Creates a synthetic image defining the Mandelbrot set
5. interleaved_ptr.cpp
Illustrates 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
6. x_gradient.cpp
Horizontal gradient, from the tutorial
7. histogram.cpp
Algorithm to compute the histogram of an image
8. packed_pixel.cpp
Illustrates how to create a custom pixel model - a pixel whose channel size is not divisible by bytes
9. dynamic_image.cpp
Example of using images whose type is instantiated at run time