Module livekit.agents.utils.images.image

Functions

def encode(frame: VideoFrame, options: EncodeOptions)
def import_pil()

Classes

class EncodeOptions (format: Literal['JPEG', 'PNG'] = 'JPEG', resize_options: Optional[ForwardRef('ResizeOptions')] = None)

EncodeOptions(format: Literal['JPEG', 'PNG'] = 'JPEG', resize_options: Optional[ForwardRef('ResizeOptions')] = None)

Expand source code
@dataclass
class EncodeOptions:
    format: Literal["JPEG", "PNG"] = "JPEG"
    resize_options: Optional["ResizeOptions"] = None

Class variables

var format : Literal['JPEG', 'PNG']
var resize_options : Optional[ResizeOptions]
class ResizeOptions (width: int, height: int, strategy: Literal['center_aspect_fit', 'center_aspect_cover', 'skew'])

ResizeOptions(width: int, height: int, strategy: Literal['center_aspect_fit', 'center_aspect_cover', 'skew'])

Expand source code
@dataclass
class ResizeOptions:
    width: int
    height: int
    strategy: Literal["center_aspect_fit", "center_aspect_cover", "skew"]

Class variables

var height : int
var strategy : Literal['center_aspect_fit', 'center_aspect_cover', 'skew']
var width : int