afre's G'MIC diary

Update

A. Remember that all new changes require G’MIC 2.8.x and my commands don’t factor in alpha or CMYK (CMYKA). As a result, they may misbehave in GUI apps where layers contain an alpha channel.

B. afre_orien is finally retrievable via gmic update. It is the counterpart to afre_y50, as orientation is to norm, which is to say that it is the colour component.

C. afre_softlight CLI GUI is in a PR and should be retrievable soon. It is invertible and adaptable. I will explain below. Take this example:

gmic sp tiger +afre_softlight 0 +afre_softlight[0,1] 1,1 rm..

1 Since there is only one layer, the image will blend itself.

2 First parameter is inverse={ 0 | 1 }; second is reverse_order={ 0 | 1 }. If we do a normal soft light blend of tiger and then use the original tiger to inverse blend, you get the original tiger back, short of some rounding errors. PS an invertible soft light is much slower than the stdlib one because it uses 2 power operations.

Take this next example:

gmic sp boats,chick,david +afre_softlight 0 +afre_softlight[0,1] 0,1 rm[3]

3 Since boats is grey scale while chick is RGB, the output will inherit the one with the most channels, which would be RGB. This shall be limited to GA, RGB, RGBA only.

4 The x and y axes are also unmatching. To prevent image edges from showing, the blending layer will be zoomed in or out so that the original layer will fit inside of it. Since salient content is almost always near the centre, the blending layer will also be centred w.r.t. the original.

5 The command takes a minimalist approach to indexing. It allows the user to select any number of images but will only blend the last two on the list. Since G’MIC orders its selections, a convenience parameter reverse_order has been included.

6 The blending is normalized and respects the base layer’s range. This means that the effect is spread out to all of the tones.

7 Issues GUI:
a The plugin preview doesn’t align the input layers properly after the resizing and repositioning of the blending layer. A workaround to this to Reset Zoom once in a while.
b At least in GIMP, after committing the change, the canvas is cropped at the right and bottom edges. Ideally, I would want no crop to occur and to have the resultant image centred on the canvas.

Suggestions on 7a and 7b are welcome.

PS 7a is explained in Release of G'MIC 2.8 - #15 by afre and 7b below.