Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- y_min_limit = abs(min(0, y))
- y_max_limit = min(len(logo), len(image) - y)
- x_min_limit = abs(min(0, x))
- x_max_limit = min(len(logo[0]), len(image[0]) - x)
- for row in range(y_min_limit, y_max_limit):
- for column in range(x_min_limit, x_max_limit):
- image[row + y][column + x] = alpha * image[row + y][column + x] + (1 - alpha) * logo[row][column]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement