From efafb1570a37048b25bff8a914f69c03ce574284 Mon Sep 17 00:00:00 2001 From: yo mama Date: Mon, 16 Feb 2015 22:00:59 -0800 Subject: ok ok ok --- css/main.css | 12 ++++++++++++ css/overlay.css | 1 + css/result.css | 3 +++ css/sketch.css | 3 +++ index.html | 18 +++++++++++++++--- makePattern.py | 10 +++++++--- 6 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 css/result.css diff --git a/css/main.css b/css/main.css index 21cb054..eaa5165 100644 --- a/css/main.css +++ b/css/main.css @@ -71,3 +71,15 @@ tr .dontshowme{ display: none; } +#acknowledgments{ + position: relative; + font-size: 10px; + float: right; + bottom:-16px; +} +#acknowledgments > a{ + color: gray; +} +#acknowledgments > a:active{ + color: gray; +} diff --git a/css/overlay.css b/css/overlay.css index b406f71..11decee 100644 --- a/css/overlay.css +++ b/css/overlay.css @@ -26,3 +26,4 @@ position: absolute; } + diff --git a/css/result.css b/css/result.css new file mode 100644 index 0000000..00567aa --- /dev/null +++ b/css/result.css @@ -0,0 +1,3 @@ +#links > input{ + width:100%; +} diff --git a/css/sketch.css b/css/sketch.css index 1fa0266..2e9e75c 100644 --- a/css/sketch.css +++ b/css/sketch.css @@ -1,3 +1,6 @@ +#draw{ + display:none; +} #canvas_wrapper{ // position:absolute; diff --git a/index.html b/index.html index da4ec0e..c764b18 100644 --- a/index.html +++ b/index.html @@ -6,6 +6,7 @@ + @@ -206,8 +207,9 @@ Image Url:
-
CANCEL
+
CLOSE
+
Draw an image below.
(Each square will be 1 sq. pixel)
@@ -234,16 +236,26 @@ Image Url:Show grid? -
+ +
+
Your Result:
+ + +
+
-
site by pepper...thanks to jules (http://asdf.us/ascii) and timb (superpaint...RIP)
+
site by pepper...thanks to jules (http://asdf.us/ascii) and timb (superpaint...RIP)
diff --git a/makePattern.py b/makePattern.py index d9bbf54..98d298b 100755 --- a/makePattern.py +++ b/makePattern.py @@ -38,12 +38,14 @@ def hexdir(filename): #repage command convert original.png -resize 425x92 -repage 425x92+0+0 new.png class Pattern: + def __init__(self): self.nametag = "imPattern"; self.pid = str(getpid()) self.pattern_file = ""; self.original_file = ""; self.username = ""; + self.commands = []; def makeResultFilename(self): file_base, extension = path.splitext(self.original_file) @@ -58,11 +60,13 @@ class Pattern: #second step use the Canvas as a background def makeMask(self): #tile the pattern pattern on the canvas - call([BIN_COMPOSITE,"-tile", self.pattern_file, self.canvas_file, self.mask_file]) - + command = [BIN_COMPOSITE,"-tile", self.pattern_file, self.canvas_file, self.mask_file]; + call(command) + self.commands.append(command) #fuse the tiled file to create a mask #convert thebg.gif -compose Dst_In null: thefile.gif -matte -layers composite new.gif - call([BIN_CONVERT, self.mask_file, "-compose", "Dst_In", "null:", self.original_file, "-matte", "-layers", "composite", self.mask_file]) + command = [BIN_CONVERT, self.mask_file, "-compose", "Dst_In", "null:", self.original_file, "-matte", "-layers", "composite", self.mask_file] + call(command) #cleanup call(["rm", self.canvas_file]) -- cgit v1.2.3-70-g09d2