summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-24 15:20:14 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-24 15:20:14 +0100
commitbcec7f5b772067aadbbd69a86c5294a2cccd98a3 (patch)
treedbce0da6549b019e45ec370240f241f8bf2ee530 /src
parentimprove makefile (diff)
downloadblueshift-bcec7f5b772067aadbbd69a86c5294a2cccd98a3.tar.gz
blueshift-bcec7f5b772067aadbbd69a86c5294a2cccd98a3.tar.bz2
blueshift-bcec7f5b772067aadbbd69a86c5294a2cccd98a3.tar.xz
make lower_resultion's parameters optional
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/curve.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/curve.py b/src/curve.py
index 4f1d58d..c559e73 100644
--- a/src/curve.py
+++ b/src/curve.py
@@ -462,13 +462,15 @@ def manipulate(r, g = None, b = None):
# TODO document this elsewhere, and make it possible to have non-round x_colours
-def lower_resolution(x_colours, y_colours):
+def lower_resolution(x_colours = None, y_colours = None):
'''
Emulates low colour resolution
- @param x_colours:int The number of colours to emulate on the encoding axis
- @param y_colours:int The number of colours to emulate on the output axis
+ @param x_colours:int? The number of colours to emulate on the encoding axis, `i_size` if `None`
+ @param y_colours:int? The number of colours to emulate on the output axis, `o_size` if `None`
'''
+ if x_colours is None: x_colours = i_size
+ if y_colours is None: y_colours = o_size
x_r = i_size / x_colours
y_r = o_size / y_colours
for curve in (r_curve, g_curve, b_curve):