|
Boost Users : |
From: Chris Weed (chrisweed_at_[hidden])
Date: 2007-09-28 10:08:41
Hi,
I have had great success using gil, and I have some questions and feedback.
I didn't see a way to create an image of floating point values. I use
my own typedef as follows, but I would think this should be in gil:
typedef boost::gil::pixel<float,gray_layout_t> value32f_pixel_t;
It is quite common to use square filters in image processing, and I
think it would be useful to overload subimage_view with a fixed offset
from all 4 sides.
template <typename View>
inline View subimage_view(const View& src, int border)
{
return View(src.width()-border*2,src.height()-border*2,src.xy_at(border,border));
}
I also had a need for an "image" constructor that would take a size
and allocator, but not initialize the values:
image(const point_t& dimensions,
std::size_t alignment,
const Alloc alloc_in = Alloc()) :
_memory(0), _align(alignment), _alloc(alloc_in) {
allocate_and_default_construct(dimensions);
}
The biggest change I would suggest is adding the ability to take a
view of a view, a const_view of a const_view, and a const_view of a
view. This would make writing functions much easier.
Thanks,
Chris
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net