
    i                     L   d Z dZddlZddlZdej                  d<   ddlZej                  j                          ej                  j                  d      Z
d Zd Zed	k(  rEd
ej                  v r.ej                  dd \  ZZZZ eeeeg      \  ZZ eeeee       y ee       yy)a%   pygame.examples.headless_no_windows_needed

How to use pygame with no windowing system, like on headless servers.

Thumbnail generation with scaling is an example of what you can do with pygame.
NOTE: the pygame scale function uses mmx/sse if available, and can be run
  in multiple threads.
zU-scale inputimage outputimage new_width new_height
eg.  -scale in.png out.png 50 50

    NdummySDL_VIDEODRIVER)   r   c                 @   t         j                  j                  |       }t        t         j                  d      r#t         j                  j                  |||f      }n"t         j                  j                  |||f      }t         j                  j                  ||       y )Nsmoothscale)pgimageloadhasattr	transformr   scalesave)finfoutwhiscaled_images         t/home/obispo/Crisostomo_bridge/mision_env/lib/python3.12/site-packages/pygame/examples/headless_no_windows_needed.pyscaleitr      sh    
cAr||]+||//Aq6:||))!aV4HHMM,%    c                      t        | |||       y)z<smoothscale image file named fin as fout with new size (w,h)N)r   )r   r   r   r   s       r   mainr   '   s    Cq!r   __main__z-scale   )__doc__usageossysenvironpygamer   displayinitset_modescreenr   r   __name__argvr   r   r   r   mapintprint r   r   <module>r,      s   	
 
 
 !(

   

 			V	$&
 z388((12,T1a3A1S$1e r   