|
|
|
@ -509,13 +509,14 @@ class RasterView:
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
# set clip color |
|
|
|
|
clip_color = (0.5, 0.5, 0.5) |
|
|
|
|
colorized_clip_img = Image.merge("RGB", [ |
|
|
|
|
clip_img.point(lambda p: int(clip_color[0] * (255.0 - p))), |
|
|
|
|
clip_img.point(lambda p: int(clip_color[1] * (255.0 - p))), |
|
|
|
|
clip_img.point(lambda p: int(clip_color[2] * (255.0 - p))) |
|
|
|
|
]) |
|
|
|
|
result.paste(colorized_clip_img, clip_img.point(lambda p: 255 - p)) |
|
|
|
|
if not fast_render: |
|
|
|
|
clip_color = (0.5, 0.5, 0.5) |
|
|
|
|
colorized_clip_img = Image.merge("RGB", [ |
|
|
|
|
clip_img.point(lambda p: int(clip_color[0] * (255.0 - p))), |
|
|
|
|
clip_img.point(lambda p: int(clip_color[1] * (255.0 - p))), |
|
|
|
|
clip_img.point(lambda p: int(clip_color[2] * (255.0 - p))) |
|
|
|
|
]) |
|
|
|
|
result.paste(colorized_clip_img, clip_img.point(lambda p: 255 - p)) |
|
|
|
|
|
|
|
|
|
# crop 1px borders |
|
|
|
|
result = result.crop((1, 1, result.size[0] - 1, result.size[1] - 1)) |
|
|
|
|