Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Mar 27, 2024
1 parent 92ad063 commit 3125eac
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/sticker_convert/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,7 @@ def yuva_to_rgba(frame: "VideoFrame") -> "np.ndarray[Any, Any]":
yuv_array[:, :, 1:].clip(16, 240).astype(yuv_array.dtype) - 128 # type: ignore
)

rgb_array = (
cast("np.ndarray[Any, Any]", np.matmul(yuv_array, YUV_RGB_MATRIX.T))
.clip(0, 255)
.astype("uint8")
)
rgb_array = np.matmul(yuv_array, YUV_RGB_MATRIX.T).clip(0, 255).astype("uint8")

return np.concatenate((rgb_array, a), axis=2)

Expand Down

0 comments on commit 3125eac

Please sign in to comment.