platypush/plugins/camera/__init__.py
def scale_frame(frame, scale_x: Optional[float] = None, scale_y: Optional[float] = None):
        """
        Frame scaling logic. The default implementation assumes that frame is a ``PIL.Image`` object.

        :param frame: Image frame (default: a ``PIL.Image`` object).
        :param scale_x: X-scale factor.
        :param scale_y: Y-scale factor.
        """
        from PIL import Image
        if not (scale_x and scale_y) or (scale_x == 1 and scale_y == 1):
            return frame

        size = (int(frame.size[0] * scale_x), int(frame.size[1] * scale_y))
        return frame.resize(size, Image.ANTIALIAS)

        Frame scaling logic. The default implementation assumes that frame is a ``PIL.Image`` object.

        :param frame: Image frame (default: a ``PIL.Image`` object).
        :param scale_x: X-scale factor.
        :param scale_y: Y-scale factor.
        
Frame scaling logic. The default implementation assumes that frame is a ``PIL.Image`` object.
Frame scaling logic . The default implementation assumes that frame is a ` ` PIL . Image ` ` object .
def scale_frame(frame, scale_x: Optional[float] = None, scale_y: Optional[float] = None):
        from PIL import Image
        if not (scale_x and scale_y) or (scale_x == 1 and scale_y == 1):
            return frame
        size = (int(frame.size[0] * scale_x), int(frame.size[1] * scale_y))
        return frame.resize(size, Image.ANTIALIAS)
def scale_frame ( frame , scale_x : Optional [ float ] = None , scale_y : Optional [ float ] = None ) : from PIL import Image if not ( scale_x and scale_y ) or ( scale_x == 1 and scale_y == 1 ) : return frame size = ( int ( frame . size [ 0 ] * scale_x ) , int ( frame . size [ 1 ] * scale_y ) ) return frame . resize ( size , Image . ANTIALIAS )
Frame scaling logic.
Frame scaling logic .
"""
        Frame scaling logic. The default implementation assumes that frame is a ``PIL.Image`` object.

        :param frame: Image frame (default: a ``PIL.Image`` object).
        :param scale_x: X-scale factor.
        :param scale_y: Y-scale factor.
        """
frame
Image frame (default: a ``PIL.Image`` object).
Image frame ( default : a ` ` PIL . Image ` ` object ) .
scale_x
Optional[float]
None
scale_y
Optional[float]
None