Skip to content

Commit

Permalink
fix(#153): wrong calc in CropHook
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc committed Feb 1, 2021
1 parent 2b7235f commit 72d47df
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stagesepx/hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ def do(self, frame: VideoFrame, *_, **__) -> typing.Optional[VideoFrame]:
height_range, width_range = self.convert_size_and_offset(*frame.data.shape)
# ignore the rest of this frame
# same as IgnoreHook
frame.data[: height_range[0]] = 0
frame.data[height_range[1] :] = 0
frame.data[: width_range[0]] = 0
frame.data[width_range[1] :] = 0
frame.data[: height_range[0], :] = 0
frame.data[height_range[1] :, :] = 0
frame.data[:, : width_range[0]] = 0
frame.data[:, width_range[1] :] = 0
return frame


Expand Down

0 comments on commit 72d47df

Please sign in to comment.