yuuno.clip module

class yuuno.clip.Clip(clip: T) → None[source]

Bases: object

Encapsulates a clip for the applications.

Some special functions might require an extended interface that is defined in its respective places.

__len__() → int[source]

Calculates the length of the clip in frames.

Returns:The amount of frames in the clip
__getitem__(item: int) → yuuno.clip.Frame[source]

Extracts the frame from the clip.

Parameters:item – The frame number
Returns:A frame-instance with the given data.
class yuuno.clip.Frame[source]

Bases: object

This class represents a single frame out of a clip.

to_pil() → PIL.Image.Image[source]

Generates an RGB PIL-Image from the frame. :return: A PIL-Image with the frame data.

to_raw() → bytes[source]

Generates a raw RGBX-Image from the frame. :return: A bytes-object with the frame data