colorstrategy toolkit api

Casper Boemann cbr at boemann.dk
Mon Mar 14 14:57:24 CET 2005


Hi

I have created a file: doc/colorstrategyAPI

The intention is to document over the next couple of months, so that after
1.0 is out we would have enough info and thoughts to make the API.

I ask all of you to pitch in.

By the way. I have this realistic expectation that the API can be made and
we can begin using it without breaking those filters and other code that
have not yet been ported to use the API .

Now, the documentation should be done everytime one updates or messes with a
filter or any other code that touches channels directly. Think a little on
how the same task could be accomplished in an indirect and colorstrategy
independent way.

Even if you cannot find a solution right there and then, simply writing down
the code location and what it does (the usecase) into the documentation,
will help us make the API when time comes.

As an example: I have just fixed the convolution bug. Not related, but still
I observe some code that needs to be touched when time comes.

First the plugin creates matrices for each of the color channels. That would
be wrong.  A single matrix would be enough telling how to mix the colors.
Another matrix telling how to mix the alpha is ok though.

In the convolution painter (that does the actual job), we again assume that
we know how to mix several colors into one. That won't hold for hsv and lab,
and is slightly inaccurate for the other colorstrategies as well.

As a solution you might write down a wish for a function that take X number
of pixels and associated weights and produce a weighted average.

best regards / venlig hilsen
Casper Boemann



More information about the kimageshop mailing list