Browse Source

fixed bug related to clipping in fast render mode

master
Youen 2 years ago
parent
commit
a7201934be
  1. 15
      ahb_raster_view.py

15
ahb_raster_view.py

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

Loading…
Cancel
Save