1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
Ë
³òúhÉfãó.—ddlmZddlZddlZddlZddlmZddlmZm    Z    m
Z
m Z ddl m Z mZmZd$d„Zd%d„Zd&d    „Z                d'                                            d(d „Z                d)                                                            d*d „Zej*j,f                            d+d „Zej*j,f                            d+d„Zej*j,ddf                                            d,d„Zd-d.d„Zej*j,f                            d/d„ZGd„de    «Zej*j:f                            d0d„Zd1d2d„Z        d3                            d4d„Z ej*j,ddf                                            d5d„Z!d6d„Z"d6d„Z#d6d„Z$d6d„Z%d7d„Z&d8d9d„Z'e d:d „«Z(e d
d!œ                    d;d"„«Z(d
d!œd<d#„Z(y)=é)Ú annotationsN)ÚSequence)ÚLiteralÚProtocolÚcastÚoverloadé)ÚExifTagsÚImageÚ ImagePalettecóœ—t|t«r/t|«dk(r |x\}}\}}nt|«dk(r|\}}}}n|x}x}x}}fS)Néé)Ú
isinstanceÚtupleÚlen)ÚborderÚleftÚtopÚrightÚbottoms     ú?H:\Change_password\venv_build\Lib\site-packages\PIL/ImageOps.pyÚ_borderr!sg€Ü&œ%Ô Ü ˆv‹;˜!Ò Ø(.Ð .‰IˆD#™ ˜™vÜ ‹[˜AÒ Ø'-Ñ $ˆD#u™fà&,Ð,ˆÐ,ˆsÐ,U˜VØ e˜VÐ #Ð#ócóV—t|t«rddlm}|j    ||«}|S)Nr    )Ú
ImageColor)rÚstrÚrÚgetcolor)ÚcolorÚmoders   rÚ_colorr",s&€Ü%œÔÝ à×#Ñ# E¨4Ó0ˆØ €Lrcóö—|jdk(r d}t|«‚|jdvr6|jdk(rt|«dk(r||z|z}|j|«Sd|j›}t    |«‚)NÚPzmode P support coming soon)ÚLÚRGBr&éznot supported for mode )r!ÚNotImplementedErrorrÚpointÚOSError)ÚimageÚlutÚmsgs   rÚ_lutr.4sv€Ø ‡zzSÒà*ˆÜ! #Ó&Ð&Ø    ‰|Ñ    #Ø :‰:˜Ò ¤3 s£8¨s¢?ؘ‘)˜c‘/ˆC؏{‰{˜3ÓÐà'¨¯
©
 |Ð4ˆÜc‹lÐrFcó—|r!|jd«j|«}n|j|«}g}tdt|«d«D]ª}|||dz}|"t    |t
«rd||<n |D]}    d||    <Œ    |rÐt    |t «s||f}d}
td«D]
}    |
||    z}
Œ t |
|dzdz«} td«D].} | || kDr| || z
} d|| <n|| xx| zcc<d} | dksŒ.nt |
|dzdz«} tddd«D].} | || kDr| || z
} d|| <n|| xx| zcc<d} | dksŒ.ntd«D]    } || sŒ    ntddd«D]    } || sŒ    n  kr%|jttd«««Œ\d| | z
z }| |z}td«D]3}    t |    |z|z«}    |    dkrd}    n|    dkDrd}    |j|    «Œ5Œ­t||«S)    aÙ
    Maximize (normalize) image contrast. This function calculates a
    histogram of the input image (or mask region), removes ``cutoff`` percent of the
    lightest and darkest pixels from the histogram, and remaps the image
    so that the darkest pixel becomes black (0), and the lightest
    becomes white (255).
 
    :param image: The image to process.
    :param cutoff: The percent to cut off from the histogram on the low and
                   high ends. Either a tuple of (low, high), or a single
                   number for both.
    :param ignore: The background pixel value (use None for no background).
    :param mask: Histogram used in contrast operation is computed using pixels
                 within the mask. If no mask is given the entire image is used
                 for histogram computation.
    :param preserve_tone: Preserve image tone in Photoshop-like style autocontrast.
 
                          .. versionadded:: 8.2.0
 
    :return: An image.
    r%rr'édr    éÿéÿÿÿÿgào@) ÚconvertÚ    histogramÚrangerrÚintrÚextendÚlistÚappendr.)r+ÚcutoffÚignoreÚmaskÚ preserve_toner4r,ÚlayerÚhÚixÚnÚcutÚloÚhiÚscaleÚoffsets                rÚ autocontrastrGFsw€ñ8Ø—M‘M #Ó&×0Ñ0°Ó6‰    à—O‘O DÓ)ˆ    à
€Cܐqœ#˜i›.¨#Ó.ó:ˆØ e˜e c™kÐ *ˆØ Ð ä˜&¤#Ô&ؐ&’    à òBؐAb’Eðá ä˜f¤eÔ,Ø  &Ð)àˆAܘC“jò Ø˜˜"™‘I‘ð ôa˜& ™)‘m sÑ*Ó+ˆCܘC“jò Ø˜˜2™’;Ø  "¡™+CؐAb’Eàb“E˜S‘L“EؐCؘ!“8Ùð ôa˜& ™)‘m sÑ*Ó+ˆCܘC  RÓ(ò Ø˜˜2™’;Ø  "¡™+CؐAb’Eàb“E˜S‘L“EؐCؘ!“8Ùð ô˜“*ò    ˆBؐ‹uÙð    ô˜˜R Ó$ò    ˆBؐ‹uÙð    ð Š8à J‰J”tœE #›JÓ'Ö (à˜R "™WÑ%ˆEؐS˜5‘[ˆFܘC“jò Ü˜˜e™ fÑ,Ó-Ø˜’6Ø‘Bؘ#’XؐBØ—
‘
˜2•ò  ði:ôv sÓ Ðrcó¶—|jdk(sJ‚|€d|cxkr |cxkrdks!J‚J‚d|cxkr|cxkr |cxkrdksJ‚J‚tttt    |d««}tttt    |d««}|!tttt    |d««nd}    g}
g} g} t |«D]>} |
j |d«| j |d«| j |d«Œ@|    €¤t ||z
«}|D]} |
j |d| |d|dz
zt|«zz«| j |d| |d|dz
zt|«zz«| j |d| |d|dz
zt|«zz«Œ‘nDt ||z
«}t ||z
«}|D]} |
j |d| |    d|dz
zt|«zz«| j |d| |    d|dz
zt|«zz«| j |d| |    d|dz
zt|«zz«Œ‘|D]} |
j |    d| |d|    dz
zt|«zz«| j |    d| |d|    dz
zt|«zz«| j |    d| |d|    dz
zt|«zz«Œ‘t d|z
«D]>} |
j |d«| j |d«| j |d«Œ@|jd«}t||
| z| z«S)    a›
    Colorize grayscale image.
    This function calculates a color wedge which maps all black pixels in
    the source image to the first color and all white pixels to the
    second color. If ``mid`` is specified, it uses three-color mapping.
    The ``black`` and ``white`` arguments should be RGB tuples or color names;
    optionally you can use three-color mapping by also specifying ``mid``.
    Mapping positions for any of the colors can be specified
    (e.g. ``blackpoint``), where these parameters are the integer
    value corresponding to where the corresponding color should be mapped.
    These parameters must have logical order, such that
    ``blackpoint <= midpoint <= whitepoint`` (if ``mid`` is specified).
 
    :param image: The image to colorize.
    :param black: The color to use for black input pixels.
    :param white: The color to use for white input pixels.
    :param mid: The color to use for midtone input pixels.
    :param blackpoint: an int value [0, 255] for the black mapping.
    :param whitepoint: an int value [0, 255] for the white mapping.
    :param midpoint: an int value [0, 255] for the midtone mapping.
    :return: An image.
    r%Nrr1r&r    rr')
r!rrr6r"r5r9rr3r.)r+ÚblackÚwhiteÚmidÚ
blackpointÚ
whitepointÚmidpointÚ    rgb_blackÚ    rgb_whiteÚrgb_midÚredÚgreenÚblueÚiÚ    range_mapÚ
range_map1Ú
range_map2s                 rÚcolorizerY¦s¨€ðB :‰:˜Ò ÐÐ Ø
€{ؐJÔ3 *Ô3°Ò3Ð3Ñ3Ð3Ð3àJÔ? (Ô?¨jÔ?¸CÒ?Ð?Ñ?Ð?Ð?ô”Xœc‘]¤F¨5°%Ó$8Ó9€IÜ”Xœc‘]¤F¨5°%Ó$8Ó9€IØ9<¸Œd”8œC‘=¤&¨¨eÓ"4Ô5Èd€Gð €CØ €EØ €Dô:Ó ò"ˆØ 
‰
9˜Q‘<Ô Ø  ‰ Y˜q‘\Ô"Ø  ‰ I˜a‘LÕ!ð"ð €Ü˜* zÑ1Ó2ˆ    àò        ˆAØ J‰Jؘ!‘ ˜q I¨a¡L°9¸Q±<Ñ$?Ñ@ÄCÈ    ÃNÑRÑRô ð L‰Lؘ!‘ ˜q I¨a¡L°9¸Q±<Ñ$?Ñ@ÄCÈ    ÃNÑRÑRô ð K‰Kؘ!‘ ˜q I¨a¡L°9¸Q±<Ñ$?Ñ@ÄCÈ    ÃNÑRÑRõ ò        ô˜8 jÑ0Ó1ˆ
ܘ:¨Ñ0Ó1ˆ
àò        ˆAØ J‰Jؘ!‘ ˜q G¨A¡J°¸1±Ñ$=Ñ>Ä#ÀjÃ/ÑQÑQô ð L‰Lؘ!‘ ˜q G¨A¡J°¸1±Ñ$=Ñ>Ä#ÀjÃ/ÑQÑQô ð K‰Kؘ!‘ ˜q G¨A¡J°¸1±Ñ$=Ñ>Ä#ÀjÃ/ÑQÑQõ ð        ðò    YˆAØ J‰Jw˜q‘z A¨°1©¸À¹
Ñ)BÑ$CÄsÈ:ÃÑ$VÑVÔ WØ L‰Lؘ‘
˜Q )¨A¡,°¸±Ñ";Ñ<ÄÀJÃÑOÑOô ð K‰K˜ ™
 Q¨)°A©,¸À¹Ñ*CÑ%DÌÈJËÑ%WÑWÕ Xð     Yô3˜Ñ#Ó $ò"ˆØ 
‰
9˜Q‘<Ô Ø  ‰ Y˜q‘\Ô"Ø  ‰ I˜a‘LÕ!ð"ð M‰M˜%Ó  €EÜ s˜U‘{ TÑ)Ó *Ð*rcób—|j|jz }|d|dz }||k7rt||kDr8t|j|jz |dz«}||dk7r?|d|f}n7t|j|jz |dz«}||dk7r||df}|j||¬«S)aí
    Returns a resized version of the image, set to the maximum width and height
    within the requested size, while maintaining the original aspect ratio.
 
    :param image: The image to resize.
    :param size: The requested output size in pixels, given as a
                 (width, height) tuple.
    :param method: Resampling method to use. Default is
                   :py:attr:`~PIL.Image.Resampling.BICUBIC`.
                   See :ref:`concept-filters`.
    :return: An image.
    rr    ©Úresample©ÚwidthÚheightÚroundÚresize©r+ÚsizeÚmethodÚim_ratioÚ
dest_ratioÚ
new_heightÚ    new_widths       rÚcontainri ó¿€ð {‰{˜UŸ\™\Ñ)€Hؐa‘˜4 ™7Ñ"€Jà:ÒØ jÒ  Ü˜uŸ|™|¨e¯k©kÑ9¸DÀ¹GÑCÓDˆJؘT !™WÒ$ؘQ™ Ð,‘ä˜eŸk™k¨E¯L©LÑ8¸4À¹7ÑBÓCˆIؘD ™GÒ#Ø! 4¨¡7Ð+Ø <‰<˜ vˆ<Ó .Ð.rcób—|j|jz }|d|dz }||k7rt||kr8t|j|jz |dz«}||dk7r?|d|f}n7t|j|jz |dz«}||dk7r||df}|j||¬«S)aÕ
    Returns a resized version of the image, so that the requested size is
    covered, while maintaining the original aspect ratio.
 
    :param image: The image to resize.
    :param size: The requested output size in pixels, given as a
                 (width, height) tuple.
    :param method: Resampling method to use. Default is
                   :py:attr:`~PIL.Image.Resampling.BICUBIC`.
                   See :ref:`concept-filters`.
    :return: An image.
    rr    r[r]rbs       rÚcoverrl,rjr)çà?rmc
ó2—t|||«}|j|k(r|}|Stj|j||«}|j
r#|j «}||j|«|j|dk7rKt|d|jz
tdt|dd««z«}|j||df«|St|d|jz
tdt|dd««z«}    |j|d|    f«|S)at
    Returns a resized and padded version of the image, expanded to fill the
    requested aspect ratio and size.
 
    :param image: The image to resize and crop.
    :param size: The requested output size in pixels, given as a
                 (width, height) tuple.
    :param method: Resampling method to use. Default is
                   :py:attr:`~PIL.Image.Resampling.BICUBIC`.
                   See :ref:`concept-filters`.
    :param color: The background color of the padded image.
    :param centering: Control the position of the original image within the
                      padded version.
 
                          (0.5, 0.5) will keep the image centered
                          (0, 0) will keep the image aligned to the top left
                          (1, 1) will keep the image aligned to the bottom
                          right
    :return: An image.
    rr    )rircr Únewr!ÚpaletteÚ
getpaletteÚ
putpaletter^r`ÚmaxÚminÚpaster_)
r+rcrdr Ú    centeringÚresizedÚoutrpÚxÚys
          rÚpadr{Ks€ô8e˜T 6Ó*€G؇||tÒØˆð €Jôi‰i˜Ÿ
™
 D¨%Ó0ˆØ ?Š?Ø×(Ñ(Ó*ˆGØÐ"Ø—‘˜wÔ'Ø =‰=˜D ™GÒ #ܐt˜A‘w §¡Ñ.´#°a¼¸YÀq¹\È1Ó9MÓ2NÑNÓOˆAØ I‰Ig  1˜vÔ &ð €Jôt˜A‘w §¡Ñ/´3°q¼#¸iȹlÈAÓ:NÓ3OÑOÓPˆAØ I‰Ig  1˜vÔ &Ø €JrcóŒ—t|«\}}}}|j|||jd|z
|jd|z
f«S)a/
    Remove border from image.  The same amount of pixels are removed
    from all four sides.  This function works on all image modes.
 
    .. seealso:: :py:meth:`~PIL.Image.Image.crop`
 
    :param image: The image to crop.
    :param border: The number of pixels to remove.
    :return: An image.
    rr    )rÚcroprc)r+rrrrrs      rr}r}ysH€ô ' v›Ñ€Dˆ#ˆufØ :‰:t˜S %§*¡*¨Q¡-°%Ñ"7¸¿¹ÀA¹ÈÑ9OÐPÓ QÐQrcóԗ|dk(r|j«S|dkr d}t|«‚t||jz«t||jz«f}|j ||«S)aá
    Returns a rescaled image by a specific factor given in parameter.
    A factor greater than 1 expands the image, between 0 and 1 contracts the
    image.
 
    :param image: The image to rescale.
    :param factor: The expansion factor, as a float.
    :param resample: Resampling method to use. Default is
                     :py:attr:`~PIL.Image.Resampling.BICUBIC`.
                     See :ref:`concept-filters`.
    :returns: An :py:class:`~PIL.Image.Image` object.
    r    rz!the factor must be greater than 0)ÚcopyÚ
ValueErrorr`r^r_ra)r+Úfactorr\r-rcs     rrErEˆsd€ð‚{؏z‰z‹|ÐØ    1ŠØ1ˆÜ˜‹oÐäf˜uŸ{™{Ñ*Ó+¬U°6¸E¿L¹LÑ3HÓ-IÐJˆØ|‰|˜D (Ó+Ð+rcó —eZdZdZ                dd„Zy)ÚSupportsGetMeshaE
    An object that supports the ``getmesh`` method, taking an image as an
    argument, and returning a list of tuples. Each tuple contains two tuples,
    the source box as a tuple of 4 integers, and a tuple of 8 integers for the
    final quadrilateral, in order of top left, bottom left, bottom right, top
    right.
    có—y©N©)Úselfr+s  rÚgetmeshzSupportsGetMesh.getmeshªs€ð rN)r+ú Image.ImageÚreturnzUlist[tuple[tuple[int, int, int, int], tuple[int, int, int, int, int, int, int, int]]])Ú__name__Ú
__module__Ú __qualname__Ú__doc__rˆr†rrrƒrƒ¡s„ñð Ø ð ð
ô rrƒcóŒ—|j|jtjj|j |«|«S)aL
    Deform the image.
 
    :param image: The image to deform.
    :param deformer: A deformer object.  Any object that implements a
                    ``getmesh`` method can be used.
    :param resample: An optional resampling filter. Same values possible as
       in the PIL.Image.transform function.
    :return: An image.
    )Ú    transformrcr Ú    TransformÚMESHrˆ)r+Údeformerr\s   rÚdeformr”±s7€ð ?‰?Ø 
‰
”E—O‘O×(Ñ(¨(×*:Ñ*:¸5Ó*AÀ8ó ðrcób—|jdk(r|jd«}|j|«}g}tdt    |«d«D]Ó}|||dzDcgc]}|sŒ|‘Œ    }}t    |«dkr$|j t td«««ŒMtjtj|«|dz
dz}|s$|j t td«««Œ |dz}td«D]!}    |j||z«|||    |zz}Œ#ŒÕt||«Scc}w)    a„
    Equalize the image histogram. This function applies a non-linear
    mapping to the input image, in order to create a uniform
    distribution of grayscale values in the output image.
 
    :param image: The image to equalize.
    :param mask: An optional mask.  If given, only the pixels selected by
                 the mask are included in the analysis.
    :return: An image.
    r$r&rr'r    r2r1r) r!r3r4r5rr7r8Ú    functoolsÚreduceÚoperatorÚaddr9r.)
r+r<r?r,ÚbÚ_fÚhistoÚsteprArUs
          rÚequalizeržÅs€ð ‡zzSÒØ— ‘ ˜eÓ$ˆØ ‰˜Ó€AØ
€CÜ 1”c˜!“f˜cÓ "ò %ˆØ  A¨¡G˜nÖ3˜²’Ð3ˆÐ3Ü ˆu‹:˜Š?Ø J‰J”tœE #›JÓ'Õ (ä×$Ñ$¤X§\¡\°5Ó9¸EÀ"¹IÑEÈ#ÑMˆDÙØ—
‘
œ4¤ c£
Ó+Õ,à˜A‘IÜ˜s›ò%AØ—J‘J˜q D™yÔ)ؘA˜a !™e™H™ ‘Añ%ð %ô sÓ Ðùò4s ÁD,ÁD,có^—t|«\}}}}||jdz|z}||jdz|z}t||j«}    |jry|jj}
t j
|
|j |
««} t|    t«r0t|    «dk(st|    «dk(r| j|    «}    nd} tj|j||f|    «} | r| j| j
«| j|||f«| S)zÖ
    Add border to the image
 
    :param image: The image to expand.
    :param border: Border width, in pixels.
    :param fill: Pixel fill value (a color value).  Default is 0 (black).
    :return: An image.
    rr    érN)rrcr"r!rpr rqrrrrr rorrru) r+rÚfillrrrrr^r_r r!rprxs              rÚexpandr¢äs€ô ' v›Ñ€Dˆ#ˆufØ 5—:‘:˜a‘=Ñ   5Ñ (€EØ 5—:‘:˜a‘=Ñ   6Ñ )€FÜ 4˜Ÿ™Ó $€EØ ‡}‚}؏}‰}×!Ñ!ˆÜ×+Ñ+¨D°%×2BÑ2BÀ4Ó2HÓIˆÜ eœUÔ #¬¨U«°qª¼CÀ»JÈ!ºOØ×$Ñ$ UÓ+‰EàˆÜ
)‰)E—J‘J ¨ °Ó
7€CÙØ ‰w—‘¨Ô-؇IIˆed˜C[Ô!Ø €Jrçcó—|\}}d|cxkrdksnd}d|cxkrdksnd}d|cxkrdksnd}||jdz||jdzf}|jd|ddzz
|jd|ddzz
f}|d|dz }    |d|dz }
|    |
k(r |d} |d} n |    |
k\r|
|dz} |d} n |d} |d|
z } |d|d| z
|zz} |d|d| z
|zz}| || | z|| zf}|j|||¬«S)a
    Returns a resized and cropped version of the image, cropped to the
    requested aspect ratio and size.
 
    This function was contributed by Kevin Cazabon.
 
    :param image: The image to resize and crop.
    :param size: The requested output size in pixels, given as a
                 (width, height) tuple.
    :param method: Resampling method to use. Default is
                   :py:attr:`~PIL.Image.Resampling.BICUBIC`.
                   See :ref:`concept-filters`.
    :param bleed: Remove a border around the outside of the image from all
                  four edges. The value is a decimal percentage (use 0.01 for
                  one percent). The default value is 0 (no border).
                  Cannot be greater than or equal to 0.5.
    :param centering: Control the cropping position.  Use (0.5, 0.5) for
                      center cropping (e.g. if cropping the width, take 50% off
                      of the left side, and therefore 50% off the right side).
                      (0.0, 0.0) will crop from the top left corner (i.e. if
                      cropping the width, take all of the crop off of the right
                      side, and if cropping the height, take all of it off the
                      bottom).  (1.0, 0.0) will crop from the bottom left
                      corner, etc. (i.e. if cropping the width, take all of the
                      crop off the left side, and if cropping the height take
                      none from the top, and therefore all off the bottom).
    :return: An image.
    r£gð?rmrr    r)Úbox)rcra)r+rcrdÚbleedrvÚ centering_xÚ centering_yÚ bleed_pixelsÚ    live_sizeÚlive_size_ratioÚ output_ratioÚ
crop_widthÚ crop_heightÚ    crop_leftÚcrop_topr}s                rÚfitr±s‹€ðP )Ñ€Kà +Ô $ Ô $؈ Ø +Ô $ Ô $؈ à %Ô ˜#Ô Øˆð ˜EŸJ™J q™MÑ)¨5°5·:±:¸a±=Ñ+@ÐA€Lð    
‰
1‰ ˜  Q™¨!Ñ+Ñ+Ø 
‰
1‰ ˜  Q™¨!Ñ+Ñ+ð€Ið   ‘l Y¨q¡\Ñ1€Oð˜‘7˜T !™WÑ$€Lð˜,Ò&à˜q‘\ˆ
Ø ‘l‰ Ø    ˜LÒ    (à! I¨a¡LÑ0ˆ
Ø ‘l‰ ð˜q‘\ˆ
Ø ‘l \Ñ1ˆ ð˜Q‘ 9¨Q¡<°*Ñ#<À Ñ"KÑK€IؘA‰ )¨A¡,°Ñ"<À Ñ!KÑK€Hà x ¨ZÑ!7¸ÀKÑ9OÐ P€Dð <‰<˜˜f¨$ˆ<Ó /Ð/rcóT—|jtjj«S)zq
    Flip the image vertically (top to bottom).
 
    :param image: The image to flip.
    :return: An image.
    )Ú    transposer Ú    TransposeÚFLIP_TOP_BOTTOM©r+s rÚflipr·^ó€ð ?‰?œ5Ÿ?™?×:Ñ:Ó ;Ð;rcó$—|jd«S)zi
    Convert the image to grayscale.
 
    :param image: The image to convert.
    :return: An image.
    r%)r3r¶s rÚ    grayscalerºhs€ð =‰=˜Ó Ðrcó†—ttddd««}|jdk(r|j|«St    ||«S)zc
    Invert (negate) the image.
 
    :param image: The image to invert.
    :return: An image.
    r1r2Ú1)r8r5r!r)r.)r+r,s  rÚinvertr½rs=€ô ŒuS˜"˜bÓ!Ó
"€CØ$Ÿz™z¨SÒ0ˆ5;‰;sÓ ÐF´d¸5À#Ó6FÐFrcóT—|jtjj«S)zq
    Flip image horizontally (left to right).
 
    :param image: The image to mirror.
    :return: An image.
    )r³r r´ÚFLIP_LEFT_RIGHTr¶s rÚmirrorrÀ}r¸rcór—dd|z
zdz
}td«Dcgc]}||z‘Œ    }}t||«Scc}w)zÁ
    Reduce the number of bits for each color channel.
 
    :param image: The image to posterize.
    :param bits: The number of bits to keep for each channel (1-8).
    :return: An image.
    rér    r')r5r.)r+Úbitsr<rUr,s     rÚ    posterizerćsF€ð1t‘8‰_˜qÑ  Ð !€DÜ" 3›ZÖ
(˜ˆ1ˆt‹8Ð
(€CÐ
(Ü sÓ Ðùò )sš 4có”—g}td«D]-}||kr|j|«Œ|jd|z
«Œ/t||«S)z¿
    Invert all pixel values above a threshold.
 
    :param image: The image to solarize.
    :param threshold: All pixels above this grayscale level are inverted.
    :return: An image.
    r'r1)r5r9r.)r+Ú    thresholdr,rUs    rÚsolarizerǔsM€ð €CÜ 3‹Zò ˆØ ˆyŠ=Ø J‰JqMà J‰Js˜Q‘wÕ ð     ô
sÓ Ðrcó—yr…r†©r+Úin_places  rÚexif_transposerË¥s€ØLOr)rÊcó—yr…r†rÉs  rrËrË©s€ðrcó®‡
—|j«|j«}|jtjj
d«}t jjt jjt jjt jjt jjt jjt jjdœj|«}|´|r<|jj!|«|_|jj"|_n|j!|«}|r|n}|j«}tjj
|vr-|tjj
=d|j&vr|j)«|j&d<n9d|j&vr+|j)«j+«|j&d<dD]¨}||j&vsŒdD]’Š
|j&|}    t-|    t.«rt1j2‰
d|    «}    nJt-|    t4«rt5ˆ
fd    „|    D««}    n%t1j2‰
j7«d
|    «}    |    |j&|<Œ”Œª|sSy|s|j9«Sy) a
    If an image has an EXIF Orientation tag, other than 1, transpose the image
    accordingly, and remove the orientation data.
 
    :param image: The image to transpose.
    :param in_place: Boolean. Keyword-only argument.
        If ``True``, the original image is modified in-place, and ``None`` is returned.
        If ``False`` (default), a new :py:class:`~PIL.Image.Image` object is returned
        with the transposition applied. If there is no transposition, a copy of the
        image will be returned.
    r    )rr rééérÂNÚexifzRaw profile type exif)zXML:com.adobe.xmpÚxmp)ztiff:Orientation="([0-9])"z,<tiff:Orientation>([0-9])</tiff:Orientation>rc3óh•K—|])}tj‰j«d|«–—Œ+y­w)rN)ÚreÚsubÚencode)Ú.0ÚvÚpatterns  €rú    <genexpr>z!exif_transpose.<locals>.<genexpr>às*øèø€ò*ØEF¤§¡ w§~¡~Ó'7¸¸a× @ñ*ùsƒ/2r)ÚloadÚgetexifÚgetr
ÚBaseÚ Orientationr r´r¿Ú
ROTATE_180rµÚ    TRANSPOSEÚ
ROTATE_270Ú
TRANSVERSEÚ    ROTATE_90Úimr³rcÚ_sizeÚinfoÚtobytesÚhexrrrÔrÕrrÖr) r+rÊÚ
image_exifÚ orientationrdÚtransposed_imageÚ
exif_imagerÑÚkeyÚvaluerÙs           @rrËr˯s/ø€ð
‡JJ„LØ—‘“€JØ—.‘.¤§¡×!:Ñ!:¸AÓ>€Kä ?‰?× *Ñ *Ü ?‰?× %Ñ %Ü ?‰?× *Ñ *Ü ?‰?× $Ñ $Ü ?‰?× %Ñ %Ü ?‰?× %Ñ %Ü ?‰?× $Ñ $ñ÷
cˆ+Óð ðÑÙ Ø—x‘x×)Ñ)¨&Ó1ˆEŒHØŸ(™(Ÿ-™-ˆEKà$Ÿ™¨vÓ6Ð Ù&‘UÐ,<ˆ
à×!Ñ!Ó#ˆÜ =‰=× $Ñ $¨Ò ,Ø”X—]‘]×.Ñ.Ð/ؘŸ™Ñ(Ø*.¯,©,«.
—‘ Ò'Ø(¨J¯O©OÑ;Ø;?¿<¹<»>×;MÑ;MÓ;O
—‘Р7Ñ8Ø3ò 5Ø˜*Ÿ/™/Ò)ð$ò 5˜ð!+§¡°Ñ 4˜Ü% e¬SÔ1Ü$&§F¡F¨7°B¸Ó$>™EÜ'¨¬uÔ5Ü$)ó*ØJOô*ó%™Eô%'§F¡F¨7¯>©>Ó+;¸SÀ%Ó$H˜EØ/4˜
Ÿ™¨Ò,ñ 5ð 5ñ Ø#Ð #ð ñ؏z‰z‹|ÐØ r)rúint | tuple[int, ...]rŠztuple[int, int, int, int])r ústr | int | tuple[int, ...]r!rrŠrð)r+r‰r,z    list[int]rŠr‰)rNNF) r+r‰r:zfloat | tuple[float, float]r;zint | Sequence[int] | Noner<úImage.Image | Noner=ÚboolrŠr‰)Nrr1é)r+r‰rIústr | tuple[int, ...]rJrõrKú"str | int | tuple[int, ...] | NonerLr6rMr6rNr6rŠr‰)r+r‰rcútuple[int, int]rdr6rŠr‰) r+r‰rcr÷rdr6r rörvútuple[float, float]rŠr‰)r)r+r‰rr6rŠr‰)r+r‰rÚfloatr\r6rŠr‰)r+r‰r“rƒr\r6rŠr‰r…)r+r‰r<ròrŠr‰)rr)r+r‰rrðr¡rñrŠr‰) r+r‰rcr÷rdr6r¦rùrvrørŠr‰)r+r‰rŠr‰)r+r‰rÃr6rŠr‰)é€)r+r‰rÆr6rŠr‰)r+r‰rÊz Literal[True]rŠÚNone)r+r‰rÊzLiteral[False]rŠr‰)r+r‰rÊrórŠrò))Ú
__future__rr–r˜rÔÚcollections.abcrÚtypingrrrrrr
r r rr"r.rGrYÚ
ResamplingÚBICUBICrirlr{r}rErƒÚBILINEARr”ržr¢r±r·rºr½rÀrÄrÇrËr†rrú<module>rs1ðõ&#ãÛÛ    Ý$ß4Ó4ç+Ñ+ó $óó ð(+,Ø)-Ø#Øð ]Ø ð]à 'ð]ð 'ð]ð ð    ]ð
ð ]ð ó ]ðH/3ØØØðd+Ø ðd+à  ðd+ð !ðd+ð
,ð    d+ð
ð d+ð ð d+ððd+ðód+ðP>C×=MÑ=M×=UÑ=Uð/Ø ð/Ø-ð/Ø7:ð/àó/ð@>C×=MÑ=M×=UÑ=Uð/Ø ð/Ø-ð/Ø7:ð/àó/ðD×"Ñ"×*Ñ*Ø04Ø%/ð +Ø ð+à
ð+ð ð+ð .ð    +ð
#ð +ð ó +ô\ Rð 8=×7GÑ7G×7OÑ7Oð,Ø ð,Ø %ð,Ø14ð,àó,ô2  hô  ð&×$Ñ$×-Ñ-ðØ ðàððððó    ô(ðB%&Ø()ðØ ðà !ðð &ððó    ðD×"Ñ"×*Ñ*ØØ%/ð X0Ø ðX0à
ðX0ð ðX0ð ð    X0ð
#ð X0ð ó X0óv<óóGó<ó
ôð"
ÚOó
ØOð
à6;ñØ ðØ%3ðàòó
ðð
<Aö;r