summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--css/main.css12
-rw-r--r--css/overlay.css1
-rw-r--r--css/result.css3
-rw-r--r--css/sketch.css3
-rw-r--r--index.html18
-rwxr-xr-xmakePattern.py10
6 files changed, 41 insertions, 6 deletions
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 @@
<link href='css/main.css' rel='stylesheet' type='text/css'/>
<link href='css/overlay.css' rel='stylesheet' type='text/css'/>
<link href='css/sketch.css' rel='stylesheet' type='text/css'/>
+<link href='css/result.css' rel='stylesheet' type='text/css'/>
</head>
<body>
@@ -206,8 +207,9 @@ Image Url:<input type="text/css" class="image_input" value="Enter an image url h
<div class="result dontshowme"></div>
<div id="overlay">
- <div class="close">CANCEL</div>
+ <div class="close">CLOSE</div>
<div class="content">
+<!-- {{{DRAW-->
<div id="draw">
<div>Draw an image below.
</br>(Each square will be 1 sq. pixel)</div>
@@ -234,16 +236,26 @@ Image Url:<input type="text/css" class="image_input" value="Enter an image url h
<input type="checkbox" id="show_grid" checked>Show grid?</input>
<button id="drawing_finished">DONE</button>
- </div>
</div>
+<!-- }}}-->
+ <div id="final_image">
+ <div class="result">Your Result:</div>
+ <img src="test.gif"/>
+ <div id="links">
+ URL:<input type="text" value=""></input>
+ </br>
+ view more at &rarr;<a href="http://asdf.us/im/gallery">PHOTOBLASTER GALLERY:</a>
+ </div>
+ </div>
+ </div>
</div>
-<div id="acknowledgments">site by pepper...thanks to jules (http://asdf.us/ascii) and timb (superpaint...RIP)</div>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/Math.uuid.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" src="js/sketch.js"></script>
<script type="text/javascript" src="js/overlay.js"></script>
<script type="text/javascript" src="js/choose_your_own.js"></script>
+<div id="acknowledgments">site by pepper...thanks to jules (<a href="http://asdf.us/ascii">http://asdf.us/ascii</a>) and timb (superpaint...RIP)</div>
</body>
</html>
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])