platypush/plugins/camera/__init__.py
def store_frame(frame, filepath: str, format: Optional[str] = None):
        """
        Capture a frame to the filesystem using the ``PIL`` library - it can be overridden by derived classes.

        :param frame: Frame object (default: a byte-encoded object or a ``PIL.Image`` object).
        :param filepath: Destination file.
        :param format: Output format.
        """
        from PIL import Image
        if isinstance(frame, bytes):
            frame = list(frame)
        elif not isinstance(frame, Image.Image):
            frame = Image.fromarray(frame)

        save_args = {}
        if format:
            save_args['format'] = format

        frame.save(filepath, **save_args)

        Capture a frame to the filesystem using the ``PIL`` library - it can be overridden by derived classes.

        :param frame: Frame object (default: a byte-encoded object or a ``PIL.Image`` object).
        :param filepath: Destination file.
        :param format: Output format.
        
Capture a frame to the filesystem using the ``PIL`` library - it can be overridden by derived classes.
Capture a frame to the filesystem using the ` ` PIL ` ` library - it can be overridden by derived classes .
def store_frame(frame, filepath: str, format: Optional[str] = None):
        from PIL import Image
        if isinstance(frame, bytes):
            frame = list(frame)
        elif not isinstance(frame, Image.Image):
            frame = Image.fromarray(frame)
        save_args = {}
        if format:
            save_args['format'] = format
        frame.save(filepath, **save_args)
def store_frame ( frame , filepath : str , format : Optional [ str ] = None ) : from PIL import Image if isinstance ( frame , bytes ) : frame = list ( frame ) elif not isinstance ( frame , Image . Image ) : frame = Image . fromarray ( frame ) save_args = { } if format : save_args [ 'format' ] = format frame . save ( filepath , ** save_args )
Capture a frame to the filesystem using the ``PIL`` library - it can be overridden by derived classes.
Capture a frame to the filesystem using the ` ` PIL ` ` library - it can be overridden by derived classes .
"""
        Capture a frame to the filesystem using the ``PIL`` library - it can be overridden by derived classes.

        :param frame: Frame object (default: a byte-encoded object or a ``PIL.Image`` object).
        :param filepath: Destination file.
        :param format: Output format.
        """
frame
Frame object (default: a byte-encoded object or a ``PIL.Image`` object).
Frame object ( default : a byte - encoded object or a ` ` PIL . Image ` ` object ) .
filepath
str
None
format
Optional[str]
None