|
Boost : |
From: Lubomir Bourdev (lbourdev_at_[hidden])
Date: 2006-11-13 21:01:08
> In VIGRA, a
> copyImage(srcImageRange(my8bitImage),
> destImage(some16bitOrFloatImage)) will simply copy the values
> without any linear transformation.
I should add to my earlier reply that I have no objection to having the
above transformation per se.
You are free to define it if you think it is useful.
You can call it copy_and_cast_pixels, for example.
My only objection is to using it as the default.
The default copy construction, assignment, and equality comparison in
GIL are defined only between compatible types for the reasons I
explained in my earlier reply.
For channels, pixels and images they are implemented using the
conventional operators (copy constructor, operator=, and operator==)
Since image views are shallow, the above operators for them do a shallow
copy/compare. This necessitates providing new syntax for deep assignment
and deep equality comparison for image views. They are implemented with
copy_pixels and equal_pixels, respectively. So copy_pixels is the image
view equivalent for operator= of a channel/pixel/image and equal_pixels
for operator== of the channel/pixel/image. They have a different
signature but the same semantics. That means they are also defined only
between compatible types.
Lubomir
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk