THEODOROS commited on
Commit
7bb0abc
·
1 Parent(s): c18ab4f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -48,7 +48,7 @@ architext_colors = [[0, 0, 0], [249, 222, 182], [195, 209, 217], [250, 120, 128]
48
 
49
  regex = re.compile(".*?\((.*?)\)")
50
 
51
- def draw_polygons(polygons, colors, im_size=(256, 256), b_color="white", fpath=None):
52
 
53
  image = Image.new("RGBA", im_size, color="white")
54
  draw = aggdraw.Draw(image)
@@ -78,7 +78,7 @@ def draw_polygons(polygons, colors, im_size=(256, 256), b_color="white", fpath=N
78
  brush2 = aggdraw.Brush((color[0], color[1], color[2]), opacity=255)
79
  draw.polygon(coords2, brush2)
80
 
81
- image = Image.frombytes("RGBA", (256,256), draw.tobytes()).transpose(Image.FLIP_TOP_BOTTOM)
82
 
83
  if(fpath):
84
  image.save(fpath, quality=100, subsampling=0)
 
48
 
49
  regex = re.compile(".*?\((.*?)\)")
50
 
51
+ def draw_polygons(polygons, colors, im_size=(512, 512), b_color="white", fpath=None):
52
 
53
  image = Image.new("RGBA", im_size, color="white")
54
  draw = aggdraw.Draw(image)
 
78
  brush2 = aggdraw.Brush((color[0], color[1], color[2]), opacity=255)
79
  draw.polygon(coords2, brush2)
80
 
81
+ image = Image.frombytes("RGBA", im_size, draw.tobytes()).transpose(Image.FLIP_TOP_BOTTOM)
82
 
83
  if(fpath):
84
  image.save(fpath, quality=100, subsampling=0)