Browse Source

fixed alpha bug that caused some lines to be too thick

pull/2/head
Youen 2 years ago
parent
commit
c4a4f09818
  1. 3
      ahb_raster_view.py

3
ahb_raster_view.py

@ -392,6 +392,7 @@ class RasterView:
alpha_img = alpha_fullres.resize(all_lines.size, Image.BILINEAR)
else:
all_lines = lines_img
alpha_img = alpha_img.point(lambda p: 0 if p == 0 else 255)
# colorize final image
fill_color = (1.0, 1.0, 1.0)
@ -399,7 +400,7 @@ class RasterView:
all_lines.point(lambda p: int(fill_color[0] * p + line_color[0] * (255.0 - p))),
all_lines.point(lambda p: int(fill_color[1] * p + line_color[1] * (255.0 - p))),
all_lines.point(lambda p: int(fill_color[2] * p + line_color[2] * (255.0 - p))),
alpha_img.point(lambda p: 0 if p == 0 else 255)
alpha_img
])
# crop 1px borders

Loading…
Cancel
Save