Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/PIL/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/PIL/__pycache__/PyAccess.cpython-310.pyc
o

Z#�a�%�
@s�ddlZddlZzddlmZdZe�Ze�e�Wney8Zzddl	m
Z
e
e�ZZWYdZ[ndZ[wwe�e�Z
Gdd�d�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�Zide�de�de�de�d e�d!e�d"e�d#e�d$e�d%e�d&e�d'e�d(e�d)e�d*e�d+e�Zejd,kr�eed-<eed.<eed/<eed0<eed1<need-<eed.<eed/<eed0<eed1<d5d3d4�ZdS)6�N)�FFIz|
    struct Pixel_RGBA {
        unsigned char r,g,b,a;
    };
    struct Pixel_I16 {
        unsigned char l,r;
    };
    �)�deferred_errorc@s>eZdZd
dd�Zdd�Zdd�Zdd	�ZeZeZd
d�Z	dS)�PyAccessFcCs�t|jj�}||_t�d|d�|_t�d|d�|_t�d|d�|_|jj	\|_
|_||_|j|_
|j
jdkr=|j|_|��dS)Nzunsigned char **�image8zint **�image32�image�P)�dict�im�unsafe_ptrs�readonly�ffi�castrrr�size�xsize�ysize�_img�_im�mode�palette�_palette�
_post_init)�self�imgr
�vals�r�./usr/lib/python3/dist-packages/PIL/PyAccess.py�__init__2szPyAccess.__init__cCsdS�Nr)rrrrrEszPyAccess._post_initcCs�|jrtd��|\}}|dkr|j|}|dkr|j|}|�||f�\}}|jjdkrAt|tt	f�rAt
|�dvrA|j�||j
�}|�|||�S)a0
        Modifies the pixel at x,y. The color is given as a single
        numerical value for single band images, and a tuple for
        multi-band images

        :param xy: The pixel coordinate, given as (x, y). See
           :ref:`coordinate-system`.
        :param color: The pixel value.
        z%Attempt to putpixel a read only imagerr	)��)r
�
ValueErrorrr�check_xyrr�
isinstance�list�tuple�lenr�getcolorr�	set_pixel)r�xy�color�x�yrrr�__setitem__Hs


�zPyAccess.__setitem__cCsJ|\}}|dkr
|j|}|dkr|j|}|�||f�\}}|�||�S)aq
        Returns the pixel at x,y. The pixel is returned as a single
        value for single band images or a tuple for multiple band
        images

        :param xy: The pixel coordinate, given as (x, y). See
          :ref:`coordinate-system`.
        :returns: a pixel value for single band images, a tuple of
          pixel values for multiband images.
        r)rrr#�	get_pixel�rr*r,r-rrr�__getitem__es

zPyAccess.__getitem__cCsR|\}}d|kr|jkr#ntd��d|kr"|jks'td��td��|S)Nrzpixel location out of range)rrr"r0rrrr#{s��zPyAccess.check_xyN�F)
�__name__�
__module__�__qualname__rrr.r1�putpixel�getpixelr#rrrrr1s
rc@�(eZdZdZdd�Zdd�Zdd�ZdS)	�
_PyAccess32_2z7PA, LA, stored in first and last bytes of a 32 bit wordcO�t�d|j�|_dS�Nzstruct Pixel_RGBA **�rrr�pixels�r�args�kwargsrrrr��z_PyAccess32_2._post_initcCs|j||}|j|jfSr)r=�r�a�rr,r-�pixelrrrr/�sz_PyAccess32_2.get_pixelcCs2|j||}t|dd�|_t|dd�|_dS)Nr�r)r=�minrBrC�rr,r-r+rErrrr)�sz_PyAccess32_2.set_pixelN�r3r4r5�__doc__rr/r)rrrrr9��
r9c@r8)	�
_PyAccess32_3zARGB and friends, stored in the first three bytes of a 32 bit wordcOr:r;r<r>rrrr�rAz_PyAccess32_3._post_initcCs|j||}|j|j|jfSr)r=rB�g�brDrrrr/��z_PyAccess32_3.get_pixelcCsH|j||}t|dd�|_t|dd�|_t|dd�|_d|_dS)NrrFr��r=rGrBrMrNrCrHrrrr)�s

z_PyAccess32_3.set_pixelNrIrrrrrL�rKrLc@r8)	�
_PyAccess32_4z&RGBA etc, all 4 bytes of a 32 bit wordcOr:r;r<r>rrrr�rAz_PyAccess32_4._post_initcCs"|j||}|j|j|j|jfSr)r=rBrMrNrCrDrrrr/�sz_PyAccess32_4.get_pixelcCsR|j||}t|dd�|_t|dd�|_t|dd�|_t|dd�|_dS)NrrFrrPr rQrHrrrr)�s
z_PyAccess32_4.set_pixelNrIrrrrrR�rKrRc@r8)	�
_PyAccess8z%1, L, P, 8 bit images stored as uint8cO�|j|_dSr)rr=r>rrrr��z_PyAccess8._post_initcC�|j||Sr�r=�rr,r-rrrr/��z_PyAccess8.get_pixelcC�Hz
t|d�|j||<WdSty#t|dd�|j||<YdSw)NrFr�rGr=�	TypeError�rr,r-r+rrrr)��
�z_PyAccess8.set_pixelNrIrrrrrS��
rSc@r8)	�_PyAccessI16_Nz0I;16 access, native bitendian without conversioncOr:)Nzunsigned short **�rrrr=r>rrrr�rAz_PyAccessI16_N._post_initcCrVrrWrXrrrr/�rYz_PyAccessI16_N.get_pixelcCrZ)N�rr[r]rrrr)�r^z_PyAccessI16_N.set_pixelNrIrrrrr`�r_r`c@r8)	�_PyAccessI16_LzI;16L access, with conversioncOr:�Nzstruct Pixel_I16 **rar>rrrr�rAz_PyAccessI16_L._post_initcCs|j||}|j|jdS�N��r=�lrBrDrrrr/�rOz_PyAccessI16_L.get_pixelcCsV|j||}zt|d�}Wntyt|dd�}Ynw|d@|_|d?|_dS)NrbrrF�)r=rGr\rhrBrHrrrr)���
z_PyAccessI16_L.set_pixelNrIrrrrrc�rKrcc@r8)	�_PyAccessI16_BzI;16B access, with conversioncOr:rdrar>rrrr�rAz_PyAccessI16_B._post_initcCs|j||}|jd|jSrergrDrrrr/�rOz_PyAccessI16_B.get_pixelcCsV|j||}zt|d�}Wntyt|dd�}Ynw|d?|_|d@|_dS)NrbrrirF)r=rG�	ExceptionrhrBrHrrrr)�rjz_PyAccessI16_B.set_pixelNrIrrrrrk�rKrkc@r8)	�_PyAccessI32_Nz"Signed Int32 access, native endiancOrTr�rr=r>rrrr
rUz_PyAccessI32_N._post_initcCrVrrWrXrrrr/
rYz_PyAccessI32_N.get_pixelcCs||j||<dSrrWr]rrrr)sz_PyAccessI32_N.set_pixelNrIrrrrrmr_rmc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�_PyAccessI32_Swapz,I;32L/B access, with byteswapping conversioncOrTrrnr>rrrrrUz_PyAccessI32_Swap._post_initcCs\t�d|�}t�d|�}|d|d|d|df\|d<|d<|d<|d<t�d|�dS)Nzint *zunsigned char *r rPrr)r�newr)r�i�orig�charsrrr�reverses4z_PyAccessI32_Swap.reversecCs|�|j||�Sr�rtr=rXrrrr/ rAz_PyAccessI32_Swap.get_pixelcCs|�|�|j||<dSrrur]rrrr)#sz_PyAccessI32_Swap.set_pixelN)r3r4r5rJrrtr/r)rrrrrosroc@r8)	�
_PyAccessFz32 bit float accesscOr:)Nzfloat **r<r>rrrr*rAz_PyAccessF._post_initcCrVrrWrXrrrr/-rYz_PyAccessF.get_pixelcCs<z
||j||<WdSty|d|j||<YdSw)Nr)r=r\r]rrrr)0s
�z_PyAccessF.set_pixelNrIrrrrrv'r_rv�1�Lr	�LA�La�PA�RGB�LAB�HSV�YCbCr�RGBA�RGBa�RGBX�CMYK�F�I�littlezI;16zI;16LzI;16BzI;32LzI;32BFcCs.t�|jd�}|st�d|j�dS|||�S)NzPyAccess Not Implemented: %s)�mode_map�getr�logger�debug)rr
�access_typerrrrp\s

rpr2)�logging�sys�cffir�defsr�cdef�ImportError�ex�_utilr�	getLoggerr3r�rr9rLrRrSr`rcrkrmrorvr��	byteorderrprrrr�<module>s���
Q
��������	�
���
����



Youez - 2016 - github.com/yon3zu
LinuXploit