tdefault ncolors = 16 - cross-stitch - interactively turn images into patterns for cross stitching
(HTM) git clone git://src.adamsgaard.dk/cross-stitch
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 6ded3d310a5670c85ffa14af46c898839521efcd
(DIR) parent b8948bc4acd8107a723b6c23b5b417120b7813d9
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Fri, 14 Feb 2014 15:20:34 +0100
default ncolors = 16
Diffstat:
M Makefile | 2 +-
M README.rst | 4 ++--
M cross-stitch.py | 4 ++--
M fisker-pattern.png | 0
M generate-readme.sh | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
---
(DIR) diff --git a/Makefile b/Makefile
t@@ -2,7 +2,7 @@ README.rst: generate-readme.sh cross-stitch.py fisker-pattern.png
@bash $< $@
fisker-pattern.png: cross-stitch.py fiskeren.jpg
- @python $< -i fiskeren.jpg -o $@ -w 50
+ @python $< -i fiskeren.jpg -o $@ -w 50 -c 16
clean:
$(RM) README.rst
(DIR) diff --git a/README.rst b/README.rst
t@@ -44,12 +44,12 @@ optional arguments:
--width WIDTH, -w WIDTH
canvas width, default value = 20
--ncolors NCOLORS, -c NCOLORS
- number of colors in output image, default value = 10
+ number of colors in output image, default value = 16
Example
-------
- $ ./cross-stitch.py -i fiskeren.jpg -o fisker-pattern.py -w 50
+ $ ./cross-stitch.py -i fiskeren.jpg -o fisker-pattern.py -w 50 -c 16
.. image:: fiskeren.jpg
:scale: 50 %
(DIR) diff --git a/cross-stitch.py b/cross-stitch.py
t@@ -20,8 +20,8 @@ parser.add_argument('--outfile', '-o', metavar='file', type=str, nargs=1,
required=True, help='save processed image as file')
parser.add_argument('--width', '-w', type=int, nargs=1, default=20,
help='canvas width, default value = 20')
-parser.add_argument('--ncolors', '-c', type=int, nargs=1, default=10,
- help='number of colors in output image, default value = 10')
+parser.add_argument('--ncolors', '-c', type=int, nargs=1, default=16,
+ help='number of colors in output image, default value = 16')
args = parser.parse_args()
infile = args.infile[0]
outfile = args.outfile[0]
(DIR) diff --git a/fisker-pattern.png b/fisker-pattern.png
Binary files differ.
(DIR) diff --git a/generate-readme.sh b/generate-readme.sh
t@@ -42,7 +42,7 @@ EXAMPLE="
Example
-------
- $ ./cross-stitch.py -i fiskeren.jpg -o fisker-pattern.py -w 50
+ $ ./cross-stitch.py -i fiskeren.jpg -o fisker-pattern.py -w 50 -c 16
.. image:: fiskeren.jpg
:scale: 50 %