U
    [Ožhš  ã                   @   s    d dl ZddlmZ dd„ ZdS )é    Né   )Ú	ImageClipc                    sD   t ˆ tƒrˆ j‰ t ˆ tjƒr.|  ‡ fdd„¡S |  ‡ fdd„¡S dS )z´ Returns the logical 'or' (max) between two masks.
        other_clip can be a mask clip or a picture (np.array).
        The result has the duration of 'clip' (if it has any)
    c                    s   t  | ˆ ¡S ©N)ÚnpÚmaximum)Úf©Ú
other_clip© úJ/var/www/html/venv/lib/python3.8/site-packages/moviepy/video/fx/mask_or.pyÚ<lambda>   ó    zmask_or.<locals>.<lambda>c                    s   t  | |ƒˆ  |¡¡S r   )r   r   Z	get_frame)ZgfÚtr   r
   r   r      s   
ÿN)Ú
isinstancer   Zimgr   ZndarrayZfl_imageÚfl)Zclipr	   r
   r   r   Úmask_or   s
    
r   )Únumpyr   Z	VideoClipr   r   r
   r
   r
   r   Ú<module>   s   