| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.9/site-packages/PIL/__pycache__/ |
Upload File : |
a
h�a) � @ sL d dl Z ddlmZ e jdkr6d dlZd dlZd dlZd
dd�Zdd � ZdS )� N� )�Image�darwinFc C sJ |d u r�t jdkrtt�d�\}}t�|� t�dd|g� t� |�}|�
� t�|� | rp|�| �}|�� |S |S t jdkr�tj
�||�\}} }
t�d| |
dd| d d
d
d@ d�}| r�|\}}| \}
}}}|�|
| || || || f�}|S tj
j�std
��tj
�|�\} }
t�d| |
dd| d d d�}| �rF|�| �}|S )Nr z.pngZ
screencapturez-x�win32ZRGB�rawZBGRr � ������z$Pillow was built without XCB supportZBGRX� r )�sys�platform�tempfile�mkstemp�os�close�
subprocess�callr �open�load�unlinkZcrop�coreZgrabscreen_win32Z frombytesZHAVE_XCB�OSErrorZgrabscreen_x11)ZbboxZinclude_layered_windowsZall_screensZxdisplay�fh�filepath�imZ
im_cropped�offset�size�dataZx0Zy0�left�top�rightZbottom� r! �1/usr/lib/python3.9/site-packages/PIL/ImageGrab.py�grab sL
�
�
"
r# c C s� t jdkr�t�d�\} }t�| � d| d ddddg}d g}|D ]}|d
|g7 }qBt�|� d }t�|�j dkr�t
�|�}|�� t�
|� |S t jdk�r�t
j�� \}}|d
k�rdd l}|�d|�d } |d dkr�|| d � �d��d�}
n|| d � �d��d�}
|
d |
�d�� S t|t��r|dd l}|�|�}|dk�r\ddlm} |�|�S |dk�r|ddlm}
|
�|�S d S td��d S )Nr z.jpgz,set theFile to (open for access POSIX file "z" with write permission)�tryz4 write (the clipboard as JPEG picture) to theFilezend tryzclose access theFileZ osascriptz-er r �file�I� zutf-16le� �mbcs� Zpngr )�PngImagePluginZDIB)�BmpImagePluginz3ImageGrab.grabclipboard() is macOS and Windows only)r r r
r r r r r �stat�st_sizer r r r r Zgrabclipboard_win32�struct�unpack_from�decode�split�index�
isinstance�bytes�io�BytesIOr* r+ ZPngImageFiler, ZDibImageFile�NotImplementedError)r r ZcommandsZscriptZcommandr Zfmtr r/ �o�filesr6 r+ r, r! r! r"