Boost logo

Boost :

From: Lubomir Bourdev (lbourdev_at_[hidden])
Date: 2006-10-20 19:36:46

I just posted the GIL code sample files and regression tests.
You can get them from

The following example files 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


You should also resync to the latest GIL. The change:
When you assign a channel to a grayscale pixel you must qualify it with
the channel type.
For example, the following code will no longer compile:

gray8_pixel_t p(5); // error
gray8_image_t img(100,100);
img[10] = 5; // error

You must now do:

gray8_pixel_t p(bits8(5));
gray8_image_t img(100,100);
img[10] = bits8(5);

This affects the x_gradient code in the tutorial/presentation. We
updated the tutorial.


I am away this weekend. I may not have email access until Monday.


Boost list run by bdawes at, gregod at, cpdaniel at, john at