Joao S. O. Bueno wrote:
My idea is that in the end, the custom layer formulas get recorded in a gimp directory, just like brushes and patterns.

How are they recorded in the XCF file? (I may have missed that part of the thread.)

> So, a set
ofrather itneresting formulas would be shipped with the Gimp (or with the patch).

Users won't apply patches -- I doubt that more than a couple of percent of users are even actually building from source (especially for 2.0).

Hey, maybe you can fit into it effect layers. ;] Well, probably
not, they are not simple operations to layers below them. Depends
if you want to apply filter to the result, which is just the call
idea, or to the layer data only,

Actually, thta already happens.
The formulas are simply. The input operands are the letters describing a channel, followed by "1" if the channel belongs to the image bellow, or "2" if it belongs to the actual layer. And letter+D makes the destiantion channel.
So something like:
RD=R2*R2; GD=G2*G2; BD=B2*B2;
will actually square the values of each channel. Since they are treated as normalized (i.e. from 0 to 1), it's akim to using the
curves tool to enhance contrast sharply.

(Well, contrast enhancement would be more like a sigmoid function -- what you describe here is basically gamma adjustment for a fixed gamma value.)

I think that what GSR is really asking for in effect layers
is stuff like 'blur layers', 'pixelize layers', etc, which
basically is what everyone really wants. :)  These require
a decorrelation between the positions of pixels of different
drawables though -- I made a working prototype of this
during 1.1.x and it wasn't pretty.

On the technical side - I will need to code in some string manipulation now.
Are there API's for string deeply hidden ing gtk/gimplib?

Not as such -- but if you're using GTK/gimplib then you're already using glib, which has some great string manipulation functions (go look them up).

Adam D. Moss   . ,,^^   [EMAIL PROTECTED]   co:3
That gum you like is going to come back in style.

Gimp-developer mailing list

Reply via email to