Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-11-15 14:01:33


From: "Fernando Cacciola" <fcacciola_at_[hidden]>
> From: Peter Dimov <pdimov_at_[hidden]>
> > This is one of the rare cases where I'd recommend a policy-based design.
> The
> > type of an 'image element' is orthogonal to the storage policy.
> >
> I think that they are not *entirely* orthogonal.

Some combinations don't make much sense, but this doesn't mean they aren't
orthogonal.

> AFAIK, encoding schemes are different for color and bi-tonal (binary)
> images.

Which encoding schemes? linear, packed, RLE, huffman, LZW can be applied to
elements of any size.

> Thus, the fixed distinction between color and binary images seems to be
> appropriate even if a policy-based encoding scheme is supported within
each
> kind of image.
> IOW, I don't think that a complete ortogonality is at all useful; that is,
I
> don't think that it would make any sense to use RLE with a color image.

Sometimes it makes a lot of sense, say when your color image is a line
drawing.

> I would agree with an interface with both color/binary images and encoding
> schemes:
>
> color_image<float,huffman_encoder> ;
> binary_image<rle>

binary_image is obvious, it's a bi-level image; but what does color_image
mean? How do you represent a four-level image?

--
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