INNER CODE UNIT · Python
new
ljvmiranda921/sprites-as-a-service · backend/sprites/sprites.py:188
new = new_max - new_min
return (((matrix - old_min) * new) / old) + new_min
sprite_with_gradient = _remap(map_range, grad)
return sprite_with_gradient
def _combine(mat_outline: np.ndarray, mat_gradient: np.ndarray) -> np.ndarray:
"""Combine the sprite with outline and the one with gradients
Parameters
----------
mat_outline: np.ndarray
The sprite with outline
mat_gradient: np.ndarray
The sprite with gradient
Returns