From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-11-15 13:56:10
From: "Ullrich Koethe" <u.koethe_at_[hidden]>
> Peter Dimov wrote:
> > The interface as presented to the user would be orthogonal:
> > basic_image<bool, linear> // == basic_image<unsigned char, linear>
> > basic_image<bool, packed> // == vector<bool>
> > basic_image<bool, rle>
> > basic_image<unsigned char, linear>
> > basic_image<unsigned char, rle>
> So you would specialize algorithms on storage format (linear, packed,
> rle)? Interesting, but a lot of work (some algorithms are needed 3
Only where it makes sense.
Look at it this way. The choices are:
basic_image<T> - linear
packed_image // always bool
rle_image // always bool
or  - see above.
The difference is that in  you may choose what to specialize and what to
leave to the generic version to handle.
> > True, with an accessor layer on top it doesn't matter whether it's
> > image<double, 3>
> > or
> > image<array<double, 3> >
> > (when the number of channels is fixed at compile time, which it might
> > if you want to load PSDs or other multichannel formats.)
> No, I also have accessors for variable band formats (SequenceAccessor,
> VectorAccessor and VectorBandAccessor)
True, but having
image<std::vector<unsigned char> >
would be quite inefficient since the vectors won't exploit the fact that
they are the same size. Or am I missing something.
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk