浏览代码

Fixed error with non-square images

master
Noëlle Anthony 5 年前
父节点
当前提交
f6b97973f8
共有 5 个文件被更改,包括 7 次插入2 次删除
  1. 二进制
      babylon.png
  2. 二进制
      babylon.png.kra
  3. 二进制
      babylon.png~
  4. 二进制
      babylon_pattern.png
  5. 7
    2
      stitchify.py

二进制
babylon.png 查看文件


二进制
babylon.png.kra 查看文件


二进制
babylon.png~ 查看文件


二进制
babylon_pattern.png 查看文件


+ 7
- 2
stitchify.py 查看文件

linecolor = 0 if (posy-(hoff*10)) % 100 == 0 else (128,128,128) linecolor = 0 if (posy-(hoff*10)) % 100 == 0 else (128,128,128)
linewidth = 2 if (posy-(hoff*10)) % 100 == 0 else 1 linewidth = 2 if (posy-(hoff*10)) % 100 == 0 else 1
draw.line((10, posy, owid, posy), fill=linecolor, width=linewidth) draw.line((10, posy, owid, posy), fill=linecolor, width=linewidth)
char_positions = [x*10+4 for x in range(1,h+1)]
char_positions = [x*10+4 for x in range(1,max(h,w)+1)]
# print(char_positions) # print(char_positions)
#char_colors = {" ": (0,0,0), "A": (0,0,0), "B": (128,0,0), "C": (0,128,0), "D": (0,255,255), "E": (128,128,0), "F": (128,0,128), "G": (0,0,0)} #char_colors = {" ": (0,0,0), "A": (0,0,0), "B": (128,0,0), "C": (0,128,0), "D": (0,255,255), "E": (128,128,0), "F": (128,0,128), "G": (0,0,0)}
adjust = 0 adjust = 0
for line in lines: for line in lines:
for char in range(len(line)): for char in range(len(line)):
draw.text((char_positions[char], char_positions[0]-4+adjust), line[char], fill=0)
# print(char_positions[char])
# print(line[char])
try:
draw.text((char_positions[char], char_positions[0]-4+adjust), line[char], fill=0)
except:
pass
adjust += 10 adjust += 10
legend_out = "" legend_out = ""
item_ct = 0 item_ct = 0

正在加载...
取消
保存