JHumphreys91 / delaboratory

Automatically exported from code.google.com/p/delaboratory
GNU General Public License v3.0
0 stars 0 forks source link

gradient layer #43

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The request of a new tool.

It is close to current 'vignette' layer but with linear gradient mask instead 
of current circle mask. The input of gradient position and transition distance 
is very comfortable with mouse click at the start point and drag to end point 
of gradient transition from 0 to 1 transparency.

Also as an option 2 different influence on RGB channels:

1. Linear gradient simulation (like optical gradient filter) - the 'power' of 
image burn/darkening as linear function of 'gradient value' (k, in range 0..1 
or 0..10):

R = R*k
G = G*k
B = B*k

Initial k value 1. RGB in range 0..1.

2. Gamma gradient simulation (really nice transform almost impossible with 
optical linear filters) - the 'power' of image burn/darkening as linear 
function of 'gradient value' (k, in range 0..10):

R = R^k
G = G^k
B = B^k

Initial k value 1. RGB in range 0..1.

I tried to look how current 'vignette' tool process RGB values after mask 
generation depending on 'darkness' slider value but still lost in sources.

The 'gradient layer' also as current 'vignette layer' are much faster way to 
apply desired transform to the required area of the image in compare with 
classic '2layers+mask' way - first generate separate layer full of required RGB 
transform, second generate layer mask of the desired shape and third make 
approproate blending with copy of non-transformed layer.

Current 'vignette' tool may be used as limited 'gradient' tool if adjust 
radius/center/spot sliders, but the resulting mask shape still not fits most 
cases well.

Original issue reported on code.google.com by mmm2012m...@gmail.com on 3 Apr 2012 at 3:00

GoogleCodeExporter commented 8 years ago
Yes, it will be implemented, but not just for RGB, each tool is reusable in 
each colorspace, so the same effect could be achieved in LAB with L channel or 
in CMYK or in any other colorspace.

Original comment by jacekpop...@gmail.com on 3 Apr 2012 at 4:57

GoogleCodeExporter commented 8 years ago
Additional idea on controls: To unite 2 different ways of RGB channels 
processing it may be used combined equation -

For m as 'multiplication' coefficient and p as power coefficient and for each 
RGB channel -

out = m * input ^ p

With m and p defaults to 1 and user input range like 0.1..10.
So if leaving p=1 and changing only m user can simulate 'linear gradient 
filter' and leaving m=1 and changing p - simulate 'gamma-like gradient filter'. 
Also changing m and p at once user may achive more complex effect.

Original comment by mmm2012m...@gmail.com on 4 Apr 2012 at 5:48

GoogleCodeExporter commented 8 years ago
done on SVN

Original comment by jacekpop...@gmail.com on 22 May 2012 at 10:35