summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--info/blueshift.texinfo43
-rw-r--r--src/aux.py6
2 files changed, 46 insertions, 3 deletions
diff --git a/info/blueshift.texinfo b/info/blueshift.texinfo
index 0ba27ac..8433a6b 100644
--- a/info/blueshift.texinfo
+++ b/info/blueshift.texinfo
@@ -324,6 +324,7 @@ Disables or enables Blueshift.
* Weather:: Making weather dependent settings.
* Running without X:: Configuration options for running without X.
* Optimising:: Functions that can be used to optimise performance.
+* Interpolation:: Interpolation functionised curves.
@end menu
@@ -1532,6 +1533,48 @@ might be heavier than applying the adjustments
by invoking them.
+@node Interpolation
+@section Interpolation
+
+ICC profiles and curves that have beens turned
+into functions with @code{functionise} have lower
+input resolution that the input they receive;
+to compensate for this, nearest-neighbour
+interpolation is used. If you want to better
+interpolation there are a few functions that
+can be used to scale up the lookup table using
+interpolation.
+
+@table @code
+@item linearly_interpolate_ramp
+Scale up using linear interpolation.
+
+@item cubicly_interpolate_ramp
+Scale up using cubic Hermite interpolation.
+
+@end table
+
+These functions thats three arguments:
+the red, the green and the blue colour
+curves to scale up. The functions return
+a tuple of these scaled up. All functions
+are will using linear interpolation if
+an interpolation segments is non-monotonic.
+This is done, automatically by the
+functions, by using the function
+@code{eliminate_halos} that takes six
+arguments and does not return anything.
+@code{eliminate_halos}'s arguments are
+the original three colour curves, followed
+by the scaled up colour curves. The latter
+argument trio will be modified by the
+function. It does not matter which order
+there curves are in as long as the order
+is the same for the original curves and the
+scaled up curves. It is recommended to
+use the order: red, green and blue.
+
+
@node Configuration examples
@chapter Configuration examples
diff --git a/src/aux.py b/src/aux.py
index 70526e4..93f001f 100644
--- a/src/aux.py
+++ b/src/aux.py
@@ -49,7 +49,7 @@ def ramps_to_function(r, g, b):
return functionise((fp(r), fp(g), fp(b)))
-def linearly_interpolate_ramp(r, g, b): # TODO demo and document this
+def linearly_interpolate_ramp(r, g, b): # TODO demo this
'''
Linearly interpolate ramps to the size of the output axes
@@ -75,7 +75,7 @@ def linearly_interpolate_ramp(r, g, b): # TODO demo and document this
return (R, G, B)
-def cubicly_interpolate_ramp(r, g, b): # TODO demo and document this
+def cubicly_interpolate_ramp(r, g, b): # TODO demo this
'''
Interpolate ramps to the size of the output axes using cubic Hermite spline
@@ -173,7 +173,7 @@ def polynomially_interpolate_ramp(r, g, b): # TODO Speedup, demo and document th
return (R, G, B)
-def eliminate_halos(r, g, b, R, G, B): # TODO demo and document this
+def eliminate_halos(r, g, b, R, G, B): # TODO demo this
'''
Eliminate haloing effects in interpolations