-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.py
More file actions
30 lines (23 loc) · 810 Bytes
/
main.py
File metadata and controls
30 lines (23 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import StringArtWeaver
def createImg(imgPath, saveNum):
numNails = 292
maxLines = 10000
stringOpacity = 25 # 1 - 255 (255 is opaque)
skipNeighbors = 2
shape = "circle"
bgColor = (240, 230, 221)
stringColor = (158, 141, 106)
pc = StringArtWeaver.pathCreator(imgPath, numNails, maxLines, stringOpacity, skipNeighbors, shape)
pc.generate(bgColor,stringColor)
pc.savePath(saveNum)
def loadImg(loadPath):
PAGE = 48 * 20
maxLines = int(PAGE * 4)
stringOpacity = 25 # 1 - 255 (255 is opaque)
bgColor = (255,255,255)
stringColor = (0,0,0)
lp = StringArtWeaver.loadedPath(loadPath,maxLines,stringOpacity)
lp.drawImage(bgColor,stringColor)
#lp.showPath(numOutput=10)
#createImg("IMG_7156_crop.jpg", 3)
loadImg("IMG_7156_crop-save-3.bin")