MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / crop

Method crop

scenedetect/scene_manager.py:252–260  ·  view source on GitHub ↗

Portion of the frame to crop. Tuple of 4 ints in the form (X0, Y0, X1, Y1) where X0, Y0 describes one point and X1, Y1 is another which describe a rectangle inside of the frame. Coordinates start from 0 and are inclusive. For example, with a 100x100 pixel video, (0, 0, 99, 99

(self)

Source from the content-addressed store, hash-verified

250
251 @property
252 def crop(self) -> CropRegion | None:
253 """Portion of the frame to crop. Tuple of 4 ints in the form (X0, Y0, X1, Y1) where X0, Y0
254 describes one point and X1, Y1 is another which describe a rectangle inside of the frame.
255 Coordinates start from 0 and are inclusive. For example, with a 100x100 pixel video,
256 (0, 0, 99, 99) covers the entire frame."""
257 if self._crop is None:
258 return None
259 (x0, y0, x1, y1) = self._crop
260 return (x0, y0, x1 - 1, y1 - 1)
261
262 @crop.setter
263 def crop(self, value: CropRegion):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected