From: Lubomir Bourdev (lbourdev_at_[hidden])
Date: 2006-10-09 01:02:53
Andy Little wrote:
> "Stefan Seefeld" <seefeld_at_[hidden]> wrote in message
>> Andy Little wrote:
>>> Heres another example, of a field representing streamlines round a cylinder:
>>> Now presumably I could combine the locator with some function as in the
>>> mandelbrot example to find out the state of the streamlines at any point in
>>> flow. Presumably the locator could also be extended to 3D.
>> Andy, if I read that example correctly '2D coordinates' there are meant to
>> represent some physical dimensions, while here we are talking about a way to
>> index an n-dimensional raster. That's quite a different world.
> Nope 2d grid ... same concept
Either image-like operations make sense in your context, in which case you can treat your grid as an image (an image does not have to be something that will necessarily end up being displayed on screen) or they don't make sense for you in which case GIL's 2D grid is not the right tool for you.
>> FWIW, I believe the same reasoning can be applied to the color-space
>> While I think a good library to deal with color spaces and transformations
>> them would be nice, that is a different domain than how colors are represented
>> essentially as bit-fields in pixels.
> Nope Colour .. same concept.
>I strongly disagree. Modeling is always goal-driven. There is not only a single
>possible model to represent any given 'real-world' entity.
>But we are getting quite off-topic now.
I agree with Stefan. The formulas for color conversion depend on how colors are represented in memory. Multiplying two float channels can be done as simply "a*b" but if the channels are 8-bit unsigned you need to divide the result by 255 (and there is an efficient way to do that). So to do just color conversion you need to define the concept of a channel, rudimentary channel operations, channel traits, color conversion formulas, color space representations, pixel representations, pixel traits, etc. It is not that simple to take it out of GIL.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk