Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/PIL/__pycache__/PyAccess.cpython-37.pyc

69 lines
11 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
(U<>]<5D>$<00>@s|ddlZddlZddlmZe<00>e<05>ZdZe<03>Ze<08> e<07>Gdd<05>de
<EFBFBD>Z Gdd<07>de <0B>Z Gdd <09>d e <0B>Z Gd
d <0B>d e <0B>ZGd d <0A>d e <0B>ZGdd<0F>de <0B>ZGdd<11>de <0B>ZGdd<13>de <0B>ZGdd<15>de <0B>ZGdd<17>de <0B>ZGdd<19>de <0B>Zeeee e e e e e e eeeeeed<1A>Zejdk<02>rFeed<eed<eed<eed<eed <n(eed<eed<eed<eed<eed <d$d"d#<23>ZdS)%<25>N)<01>FFIz`
struct Pixel_RGBA {
unsigned char r,g,b,a;
};
struct Pixel_I16 {
unsigned char l,r;
};
c@s>eZdZd dd<03>Zdd<05>Zdd<07>Zdd <09>ZeZeZd
d <0B>Z d S)<0E>PyAccessFcCs<>t|jj<02>}||_t<04>d|d<00>|_t<04>d|d<00>|_t<04>d|d<00>|_|jj \|_
|_ |j|_ |j j dkrt|j|_|<00><10>dS)Nzunsigned char **<2A>image8zint **<2A>image32<33>image<67>P)<11>dictZimZ unsafe_ptrs<72>readonly<6C>ffi<66>castrrr<00>size<7A>xsize<7A>ysize<7A>_im<69>modeZpalette<74>_palette<74>
_post_init)<04>self<6C>imgr <00>vals<6C>r<00>0/tmp/pip-install-pc7tm5jb/Pillow/PIL/PyAccess.py<70>__init__,s  zPyAccess.__init__cCsdS)Nr)rrrrr>szPyAccess._post_initcCs<>|jrtd<01><01>|\}}|dkr(|j|}|dkr:|j|}|<00>||f<02>\}}|jjdkr~t|tt f<02>r~t
|<02>dkr~|j <0B> |<02>}|<00> |||<02>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)<02><00>)r <00>
ValueErrorr r<00>check_xyrr<00>
isinstance<EFBFBD>list<73>tuple<6C>lenrZgetcolor<6F> set_pixel)r<00>xy<78>color<6F>x<>yrrr<00> __setitem__As


   zPyAccess.__setitem__cCsJ|\}}|dkr|j|}|dkr,|j|}|<00>||f<02>\}}|<00>||<03>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)r rr<00> get_pixel)rr"r$r%rrr<00> __getitem__^s 

zPyAccess.__getitem__cCsF|\}}d|kr|jkr:nnd|kr8|jksBntd<02><01>|S)Nrzpixel location out of range)r rr)rr"r$r%rrrrts2zPyAccess.check_xyN)F)
<EFBFBD>__name__<5F>
__module__<EFBFBD> __qualname__rrr&r(ZputpixelZgetpixelrrrrrr+s
rc@s(eZdZdZdd<03>Zdd<05>Zdd<07>ZdS) <09> _PyAccess32_2z9 PA, LA, stored in first and last bytes of a 32 bit word cOst<00>d|j<02>|_dS)Nzstruct Pixel_RGBA **)r
r r<00>pixels)r<00>args<67>kwargsrrrr~sz_PyAccess32_2._post_initcCs|j||}|j|jfS)N)r-<00>r<>a)rr$r%<00>pixelrrrr'<00>sz_PyAccess32_2.get_pixelcCs2|j||}t|dd<02>|_t|dd<02>|_dS)Nr<00><><00>)r-<00>minr0r1)rr$r%r#r2rrrr!<00>sz_PyAccess32_2.set_pixelN)r)r*r+<00>__doc__rr'r!rrrrr,{sr,c@s(eZdZdZdd<03>Zdd<05>Zdd<07>ZdS) <09> _PyAccess32_3zC RGB and friends, stored in the first three bytes of a 32 bit word cOst<00>d|j<02>|_dS)Nzstruct Pixel_RGBA **)r
r rr-)rr.r/rrrr<00>sz_PyAccess32_3._post_initcCs|j||}|j|j|jfS)N)r-r0<00>g<>b)rr$r%r2rrrr'<00>sz_PyAccess32_3.get_pixelcCsH|j||}t|dd<02>|_t|dd<02>|_t|dd<02>|_d|_dS)Nrr3r4<00>)r-r5r0r8r9r1)rr$r%r#r2rrrr!<00>s
z_PyAccess32_3.set_pixelN)r)r*r+r6rr'r!rrrrr7<00>sr7c@s(eZdZdZdd<03>Zdd<05>Zdd<07>ZdS) <09> _PyAccess32_4z( RGBA etc, all 4 bytes of a 32 bit word cOst<00>d|j<02>|_dS)Nzstruct Pixel_RGBA **)r
r rr-)rr.r/rrrr<00>sz_PyAccess32_4._post_initcCs"|j||}|j|j|j|jfS)N)r-r0r8r9r1)rr$r%r2rrrr'<00>sz_PyAccess32_4.get_pixelcCsR|j||}t|dd<02>|_t|dd<02>|_t|dd<02>|_t|dd<02>|_dS)Nrr3r4r:r)r-r5r0r8r9r1)rr$r%r#r2rrrr!<00>s
z_PyAccess32_4.set_pixelN)r)r*r+r6rr'r!rrrrr;<00>sr;c@s(eZdZdZdd<03>Zdd<05>Zdd<07>ZdS) <09>
_PyAccess8z' 1, L, P, 8 bit images stored as uint8 cOs |j|_dS)N)rr-)rr.r/rrrr<00>sz_PyAccess8._post_initcCs|j||S)N)r-)rr$r%rrrr'<00>sz_PyAccess8.get_pixelcCsJyt|d<01>|j||<Wn,tk
rDt|dd<01>|j||<YnXdS)Nr3r)r5r-<00> TypeError)rr$r%r#rrrr!<00>sz_PyAccess8.set_pixelN)r)r*r+r6rr'r!rrrrr<<00>sr<c@s(eZdZdZdd<03>Zdd<05>Zdd<07>ZdS) <09>_PyAccessI16_Nz2 I;16 access, native bitendian without conversion cOst<00>d|j<02>|_dS)Nzunsigned short **)r
r rr-)rr.r/rrrr<00>sz_PyAccessI16_N._post_initcCs|j||S)N)r-)rr$r%rrrr'<00>sz_PyAccessI16_N.get_pixelcCsJyt|d<01>|j||<Wn,tk
rDt|dd<01>|j||<YnXdS)Ni<4E><69>r)r5r-r=)rr$r%r#rrrr!<00>sz_PyAccessI16_N.set_pixelN)r)r*r+r6rr'r!rrrrr><00>sr>c@s(eZdZdZdd<03>Zdd<05>Zdd<07>ZdS) <09>_PyAccessI16_Lz I;16L access, with conversion cOst<00>d|j<02>|_dS)Nzstruct Pixel_I16 **)r
r rr-)rr.r/rrrr<00>sz_PyAccessI16_L._post_initcCs|j||}|j|jdS)N<>)r-<00>lr0)rr$r%r2rrrr'<00>sz_PyAccessI16_L.get_pixelcCsX|j||}yt|d<01>}Wn"tk
r>t|dd<01>}YnX|d@|_|d?|_dS)Ni<4E><69>rr3<00>)r-r5r=rAr0)rr$r%r#r2rrrr!<00>s
z_PyAccessI16_L.set_pixelN)r)r*r+r6rr'r!rrrrr?<00>sr?c@s(eZdZdZdd<03>Zdd<05>Zdd<07>ZdS) <09>_PyAccessI16_Bz I;16B access, with conversion cOst<00>d|j<02>|_dS)Nzstruct Pixel_I16 **)r
r rr-)rr.r/rrrr<00>sz_PyAccessI16_B._post_initcCs|j||}|jd|jS)Nr@)r-rAr0)rr$r%r2rrrr'<00>sz_PyAccessI16_B.get_pixelcCsX|j||}yt|d<01>}Wn"tk
r>t|dd<01>}YnX|d?|_|d@|_dS)Ni<4E><69>rrBr3)r-r5<00> ExceptionrAr0)rr$r%r#r2rrrr!<00>s
z_PyAccessI16_B.set_pixelN)r)r*r+r6rr'r!rrrrrC<00>srCc@s(eZdZdZdd<03>Zdd<05>Zdd<07>ZdS) <09>_PyAccessI32_Nz$ Signed Int32 access, native endian cOs |j|_dS)N)rr-)rr.r/rrrrsz_PyAccessI32_N._post_initcCs|j||S)N)r-)rr$r%rrrr'sz_PyAccessI32_N.get_pixelcCs||j||<dS)N)r-)rr$r%r#rrrr! sz_PyAccessI32_N.set_pixelN)r)r*r+r6rr'r!rrrrrEsrEc@s0eZdZdZdd<03>Zdd<05>Zdd<07>Zdd <09>Zd
S) <0B>_PyAccessI32_Swapz. I;32L/B access, with byteswapping conversion cOs |j|_dS)N)rr-)rr.r/rrrrsz_PyAccessI32_Swap._post_initcCs\t<00>d|<01>}t<00>d|<02>}|d|d|d|df\|d<|d<|d<|d<t<00>d|<03>dS)Nzint *zunsigned char *rr:r4r)r
<00>newr )r<00>i<>orig<69>charsrrr<00>reverses  4z_PyAccessI32_Swap.reversecCs|<00>|j||<00>S)N)rKr-)rr$r%rrrr'sz_PyAccessI32_Swap.get_pixelcCs|<00>|<03>|j||<dS)N)rKr-)rr$r%r#rrrr!sz_PyAccessI32_Swap.set_pixelN)r)r*r+r6rrKr'r!rrrrrF s
rFc@s(eZdZdZdd<03>Zdd<05>Zdd<07>ZdS) <09>
_PyAccessFz 32 bit float access cOst<00>d|j<02>|_dS)Nzfloat **)r
r rr-)rr.r/rrrr#sz_PyAccessF._post_initcCs|j||S)N)r-)rr$r%rrrr'&sz_PyAccessF.get_pixelcCs>y||j||<Wn&tk
r8|d|j||<YnXdS)Nr)r-r=)rr$r%r#rrrr!)sz_PyAccessF.set_pixelN)r)r*r+r6rr'r!rrrrrL srL)<10>1<>LrZLAZLaZPAZRGBZLABZHSVZYCbCrZRGBAZRGBaZRGBXZCMYK<59>F<>I<>littlezI;16zI;16LzI;16BzI;32LzI;32BFcCs.t<00>|jd<00>}|s$t<03>d|j<02>dS|||<01>S)NzPyAccess Not Implemented: %s)<05>mode_map<61>getr<00>logger<65>debug)rr Z access_typerrrrGUs
rG)F)<19>logging<6E>sysZcffir<00> getLoggerr)rTZdefsr
Zcdef<65>objectrr,r7r;r<r>r?rCrErFrLrR<00> byteorderrGrrrr<00><module>sZ 

P