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
Ë
³òúh>wãó—ddlmZddlZddlZddlZddlZddlZddlZddlm    Z    m
Z
m Z m Z ddl mZmZddlmZmZdZerddlmZej,e«Zd    Z    d
ZdZ    d d d dddœZ    d)d„Zd*d„ZGd„de «ZGd„dej«Z Gd„dejB«Z"Gd„de ejF¬«Z$Gd„d«Z%d+d,d„Z&    d-                                                    d.d„Z'd/d „Z(Gd!„d"«Z)Gd#„d$«Z*Gd%„d&e*«Z+Gd'„d(e*«Z,y)0é)Ú annotationsN)ÚIOÚAnyÚ
NamedTupleÚcasté)ÚExifTagsÚImage)Ú DeferredErrorÚis_pathF)ÚStrOrBytesPathiizimage buffer overrun errorzdecoding errorz unknown errorzbad configurationzout of memory error)éÿÿÿÿéþÿÿÿéýÿÿÿéøÿÿÿi÷ÿÿÿcóԗ    tjj|«}|s |rdnd›d|›}|d|rdnd›dz }t |«S#t$rtj |«}YŒEwxYw)NÚencoderÚdecoderz error z when ÚwritingÚreadingz  image file)r
ÚcoreÚgetcodecstatusÚAttributeErrorÚERRORSÚgetÚOSError)ÚerrorrÚmsgs   ú@H:\Change_password\venv_build\Lib\site-packages\PIL/ImageFile.pyÚ _get_oserrorr Vsv€ð Üj‰j×'Ñ'¨Ó.ˆñ Ù%‘¨9Ð5°W¸U¸GÐDˆØˆV¡‘I¨iÐ8¸ Ð DÑD€CÜ 3‹<Ðøô ò Üj‰j˜ÓŠð ús‚AÁA'Á&A'Ú_Tilecó —|dS)Né©)Úts rÚ    _tilesortr&as €à ˆQ‰4€Kócó>—eZdZUded<ded<dZded<dZd    ed
<y) r!ÚstrÚ
codec_nameú tuple[int, int, int, int] | NoneÚextentsrÚintÚoffsetNztuple[Any, ...] | str | NoneÚargs)Ú__name__Ú
__module__Ú __qualname__Ú__annotations__r.r/r$r'rr!r!fs!…؃OØ -Ó-Ø€FˆCƒOØ)-€DÐ
&Ô-r'c󜇗eZdZdZ    d                    dˆfd„ Zdd„Zd„Zdˆfd„ Zdd„Zdd„Z    dˆfd„ Z
dˆfd    „ Z dd
„Z dd „Z dd „Zdd „Zdd„ZˆxZS)Ú    ImageFilez*Base class for image file format handlers.cóÖ•—t‰|«d|_d|_g|_    d|_d|_t|_t|«r3t|d«|_ tj|«|_d|_n.t!t"t$|«|_ ||nd|_d|_        |j'«|j6r$|j8ddks|j8ddkr d}t5|«‚y#t(t*t,t.t0j2f$r}t5|«|‚d}~wwxYw#t:$r(|jr|jj=«‚wxYw)    Nrrr$ÚrbTÚFznot identified by this driver)ÚsuperÚ__init__Ú
_min_frameÚcustom_mimetypeÚtileÚreadonlyÚ decoderconfigÚMAXBLOCKÚdecodermaxblockr ÚopenÚfpÚosÚfspathÚfilenameÚ _exclusive_fprrÚbytesÚ_openÚ
IndexErrorÚ    TypeErrorÚKeyErrorÚEOFErrorÚstructrÚ SyntaxErrorÚmodeÚsizeÚ BaseExceptionÚclose)ÚselfrCrFÚvrÚ    __class__s     €rr:zImageFile.__init__usCø€ô    ‰ÑÔàˆŒà+/ˆÔà!#ˆŒ    Ø*àˆŒ à.0ˆÔÜ'ˆÔä 2Œ;ä˜2˜t“nˆDŒGÜŸI™I b›MˆDŒMØ!%ˆDÕ ôœ2œe™9 bÓ)ˆDŒGØ(0Ð(<™HÀ"ˆDŒMà!&ˆDÔ ð    ð     ,Ø—
‘
” ð—9’9 §    ¡    ¨!¡ °Ò 1°T·Y±Y¸q±\ÀQÒ5FØ5Ü! #Ó&Ð&ð6GøôÜÜÜÜ— ‘ ð ò ,ô" !“n¨!Ð+ûð ,ûôò    à×!Ò!Ø—‘— ‘ ”Ø ð        ús*Â-C;Â==D7Ã;(D4Ä# D/Ä/D4Ä4D7Ä71E(có—y©Nr$©rTs rrIzImageFile._open§ó€Ø r'có8—t|dd«rft|jt«sL|j|jk7r|jj «tt d««|_|jr|jj «yy)NÚ_fpFzOperation on closed image)ÚgetattrÚ
isinstancer\r rCrSÚ
ValueErrorrYs rÚ    _close_fpzImageFile._close_fpªsd€Ü 4˜ Ô &¬z¸$¿(¹(ÄMÔ/R؏x‰x˜4Ÿ7™7Ò"Ø—‘—‘Ô Ü$¤ZÐ0KÓ%LÓMˆDŒHØ 7Š7Ø G‰GM‰MOð r'c󪕗    |j«d|_t
‰|«y#t$r }tj    d|«Yd}~Œ3d}~wwxYw)a¥
        Closes the file pointer, if possible.
 
        This operation will destroy the image core and release its memory.
        The image data will be unusable afterward.
 
        This function is required to close images that have multiple frames or
        have not had their file read and closed by the
        :py:meth:`~PIL.Image.Image.load` method. See :ref:`file-handling` for
        more information.
        NzError closing: %s)r`rCÚ    ExceptionÚloggerÚdebugr9rS)rTrrVs  €rrSzImageFile.close²sHø€ð    3Ø N‰NÔ ØˆDŒGô    ‰‰ øôò    3Ü L‰LÐ,¨c× 2Ñ 2ûð    3úsƒ)©    A²A Á Acóœ—g}|j«}g}tjj|vr[|tjj}|r<t    |t
«s|f}|D]$}|j |j|«|f«Œ&|jtjj«}|r^|jtjj«r5|j€J‚|j ||jjf«d}|D]w\}}    |j€J‚|jj!«}
|€|
}|j} |Á|jtjj«} | –| t#|dd«z } |jj%| «|jtjj&«} t    | t(«sJ‚|jj+| «}t-j.|«} t1j2| «5}ddlm} €/t    ||j8«r|    g|_|j=d«|j?«|j |«ddd«Œz|)|j€J‚|jj%|«|S#1swYŒ²xYw)NÚ _exif_offsetrr)ÚTiffImagePlugin) Úgetexifr    ÚBaseÚSubIFDsr^ÚtupleÚappendÚ _get_ifd_dictÚget_ifdÚIFDÚIFD1rÚ JpegIFOffsetÚ_infoÚnextrCÚtellr]ÚseekÚJpegIFByteCountr-ÚreadÚioÚBytesIOr
rBr8rgÚ TiffImageFileÚ
_frame_posÚ_seekÚload)rTÚ child_imagesÚexifÚifdsÚsubifd_offsetsÚ subifd_offsetÚifd1r.ÚifdÚ
ifd_offsetÚcurrent_offsetrCÚthumbnail_offsetÚlengthÚdataÚimrgs                 rÚget_child_imageszImageFile.get_child_imagesÆsP€Øˆ ؏|‰|‹~ˆØˆÜ =‰=×  Ñ   DÑ (Ø!¤(§-¡-×"7Ñ"7Ñ8ˆNÙÜ! .´%Ô8Ø&4Ð%6NØ%3òTMØ—K‘K ×!3Ñ!3°MÓ!BÀMРRÕSðTà|‰|œHŸL™L×-Ñ-Ó.ˆÙ D—H‘HœXŸ]™]×7Ñ7Ô8Ø—:‘:Ð)Ð )Ð)Ø K‰K˜˜tŸz™zŸ™Ð/Ô 0àˆØ#ó    (‰OˆCØ—7‘7Ð&Ð &Ð&Ø!ŸW™WŸ\™\›^ˆN؈~Ø'à—‘ˆB؈Ø#&§7¡7¬8¯=©=×+EÑ+EÓ#FРØ#Ð/Ø$¬°°nÀaÓ(HÑHÐ$Ø—G‘G—L‘LÐ!1Ô2à ŸW™W¤X§]¡]×%BÑ%BÓCFÜ% f¬cÔ2Ð2Ð2ØŸ7™7Ÿ<™<¨Ó/DÜŸ™ DÓ)Bä—‘˜B“ð     ( 2Ý-à#Ð+´
ؘ×5Ñ5ô1ð&0 LB”MØ—H‘H˜Q”KØ—‘”    Ø×#Ñ# BÔ'÷     (ñ     (ð%    (ð: Ð Ø—7‘7Ð&Ð &Ð&Ø G‰GL‰L˜Ô  ØÐ÷     (ñ     (ús È0AKËK     cóº—|jr |jS|j7tjj    |jj ««SyrX)r<Úformatr
ÚMIMErÚupperrYs rÚget_format_mimetypezImageFile.get_format_mimetypeùsD€Ø × Ò Ø×'Ñ'Ð 'Ø ;‰;Ð "Ü—:‘:—>‘> $§+¡+×"3Ñ"3Ó"5Ó6Ð 6Ør'có<•—t‰|«|jgzSrX)r9Ú __getstate__rF)rTrVs €rr’zImageFile.__getstate__sø€Ü‰wÑ#Ó%¨¯©¨Ñ7Ð7r'cób•—g|_t|«dkDr
|d|_t‰||«y)Né)r=ÚlenrFr9Ú __setstate__)rTÚstaterVs  €rr–zImageFile.__setstate__s-ø€ØˆŒ    Ü ˆu‹:˜Š>Ø! !™HˆDŒMÜ ‰Ñ˜UÕ#r'có^—|jr|jj«d|_y)zCheck file integrityN)rGrCrSrYs rÚverifyzImageFile.verify    s!€ð
× Ò Ø G‰GM‰MŒO؈r'cóä
—|js|j€ d}t|«‚tjj    |«}|js|Sd|_|j xrt|j«dk(}d}t|d«r|j}d}n|jj}t|d«r|j}d}n|jj}|ry|jd\}}}    }
t|
t«r|
ddf}
|dk(rJt|
t «r9t|
«d    k\r*|
d|j"k(r|
dtj$vr|    dkr d
}t'|«‚    ddl} t+|j «5} | j)| j-«d| j.¬ «|_ddd«|    |j0d|
dzz|j
j1«kDr d }t|«‚tj2j5|j
|j0||    |
«|_d}|j8rd|j8_|jA«d } |j
sÔ|jjCtD¬«tG|dd«}tIjJ|jd„«Dcgc]\}}tM|«d‘Œc}}|_tO|j«D]I\}\}}}    }
||    «tjP|j"||
|jR«}    |jU|j6|«|jVr0|jY|j«|j[d«d} n¡|}    |j\}|dzt|j«kr&|j|dzj^}||    kDr||    z
}    ||«}|s!tfrn?dt|«›d}t|«‚||z}|j[|«\}} |dkrn||d}Œž|ji«ŒLg|_||_5|jm«|jnr&|jpr|jjs«d|_
|j
stfs| dkr tu| d¬«‚tjj    |«S#1swYŒ2xYw#t<tt>f$r d|_YŒ¸wxYwcc}}w#t`tbjdf$r}tfrYd}~Œd}t|«|‚d}~wwxYw#|ji«wxYw)z"Load image data based on tile listNzcannot load this imagerrÚ    load_readFÚ    load_seekÚrawézTile offset cannot be negative)Úaccesszbuffer is not large enoughr©ÚkeyÚ tile_prefixr'có—|d|d|dfS)Nrrržr$)r=s rú<lambda>z ImageFile.load.<locals>.<lambda>`s€¨T°!©W°d¸1±g¸tÀA¹wÐ,G€r'rzimage file is truncatedzimage file is truncated (z bytes not processed)©r);r=Ú_imrr
r}ÚmaprFr•Úhasattrr›rCrwrœrur^r)rkrPÚ    _MAPMODESr_ÚmmaprBÚfilenoÚ ACCESS_READrQrÚ
map_bufferrŠÚpaletteÚdirtyrÚ ImportErrorÚ load_prepareÚsortr&r]Ú    itertoolsÚgroupbyÚlistÚ    enumerateÚ _getdecoderr?ÚsetimageÚpulls_fdÚsetfdÚdecoderAr.rJrNrÚLOAD_TRUNCATED_IMAGESÚcleanupr>Úload_endrGÚ!_close_exclusive_fp_after_loadingrSr )rTrÚpixelÚuse_mmapr>rwruÚ decoder_namer,r.r/rªrCÚerr_codeÚprefixÚ_ÚtilesÚirÚbÚ
read_bytesÚ next_offsetÚsÚeÚns                         rr}zImageFile.loads¾€ðyŠy˜TŸX™XÐ-Ø*ˆCܘ#“,Ð ä— ‘ × Ñ  Ó&ˆØyŠy؈Là%)ˆŒØ—=‘=Ò8¤S¨¯©£^°qÑ%8ˆàˆô 4˜Ô %Ø—>‘>ˆDà‰Hà—7‘7—<‘<ˆDä 4˜Ô %Ø—>‘>ˆD؉Hà—7‘7—<‘<ˆDâ à26·)±)¸A±,Ñ /ˆL˜' 6¨4ܘ$¤Ô$ؘa |à Ó%ܘt¤UÕ+ܘ“I “Nؘ‘G˜tŸy™yÓ(ؘ‘GœuŸ™Ò.à˜A’:Ø:CÜ$ S›/Ð)ð$ãä˜dŸm™mÓ,ðV°Ø#'§9¡9¨R¯Y©Y«[¸!ÀD×DTÑDT 9Ó#U˜œ÷Và §    ¡    ¨!¡ ¨t°A©wÑ 6Ñ6¸¿¹¿¹»ÒHØ:˜Ü% c›lÐ*Ü#Ÿj™j×3Ñ3ØŸ™ $§)¡)¨\¸6À4óD”Gð !Hð—|’|Ø-.˜Ÿ ™ Ô*ð     ×ÑÔØˆØx‹xà I‰IN‰NœyˆNÔ )ô˜T =°#Ó6ˆFô
!*× 1Ñ 1Ø—I‘IÑGó!÷áAuôU“ ˜B“óˆDŒIô =FÀdÇiÁiÓ<Pó- &Ñ8Ñ8L '¨6°4ِV” Ü×+Ñ+Ø—I‘I˜|¨T°4×3EÑ3Eóð(&Ø×$Ñ$ T§W¡W¨gÔ6Ø×'Ò'ØŸ ™  d§g¡gÔ.Ø#*§>¡>°#Ó#6°qÑ#9™à"˜Ø"Ø)-×)=Ñ)=˜JØ  1™u¤s¨4¯9©9£~Ò5Ø.2¯i©i¸¸A¹Ñ.>×.EÑ.E  Ø#.°Ò#7Ø1<¸vÑ1E Jð>Ù$(¨Ó$4 ñ$%Ý#8Ø$)ð),Ü,/°«F¨8Ð3Hð)Jð%(ô+2°#«,Ð$6à ! A¡˜AØ*1¯.©.¸Ó*;™K˜A˜xØ  1šuØ %Ø ! ! " ˜Að=#ðB—O‘OÖ%ð[- &ð^ˆŒ    Ø ˆŒ à  ‰ Œà × Ò  $×"HÒ"HØ G‰GM‰MŒO؈ŒàxŠxÕ 5¸(ÀQº,ä˜x°Ô7Ð 7ä{‰{×Ñ Ó%Ð%÷yVñVûô'¬´Ð=ò$Ø#D—Hð$üóøô4%/´· ± Ð#=ò>å#8Ý$)à*C CÜ*1°#«,¸AÐ$=ûð >ûð2—O‘OÕ%úsoÅ2S:Æ 2S-Æ=B#S:ËTÍB(UÏ0T"Ï8AUÓ-S7Ó2S:Ó:TÔTÔ"UÔ;UÕUÕUÕUÕUÕU/cóì—|j€9tjj|j|j
«|_|jdk(r tjj|«yy)NÚP)r¦r
rÚnewrPrQrŠr}rYs rr±zImageFile.load_prepare¡sM€à 8‰8Ð Ü—j‘j—n‘n T§Y¡Y°·    ±    Ó:ˆDŒGà 9‰9˜Ò Ü K‰K× Ñ ˜TÕ "ð r'có—yrXr$rYs rr¾zImageFile.load_end©ó€à r'cóȗ||jks4t|d«r |j)|t|d«|jzk\r d}t    |«‚|j «|k7S)NÚ    _n_framesÚn_framesz attempt to seek outside sequence)r;r¨rÔr]rMrt)rTÚframers   rÚ _seek_checkzImageFile._seek_checkµs]€à D—O‘OÒ #ô˜T ;Ô/°D·N±NÐ4JØœW T¨:Ó6¸¿¹ÑHÒHð5ˆCܘ3“-Ð ày‰y‹{˜eÑ#Ð#r'rX)rCzStrOrBytesPath | IO[bytes]rFzstr | bytes | NoneÚreturnÚNone©rØrÙ)rØzlist[ImageFile])rØú
str | None)rØú    list[Any])r—rÜrØrÙ©rØzImage.core.PixelAccess | None)rÖr-rØÚbool)r0r1r2Ú__doc__r:rIr`rSr‹rr’r–r™r}r±r¾r×Ú __classcell__)rVs@rr5r5rsjø„Ù4ðNRð0Ø,ð0Ø8Jð0à     õ0ód òõó(1ófõ8õ$ó óM&ó^#ó ÷ $r'r5có:—eZdZdd„Zej
dd„«Zy)Ú StubHandlercó—yrXr$©rTrŠs  rrBzStubHandler.openÆrZr'có—yrXr$räs  rr}zStubHandler.loadÉrÒr'N)rŠÚ StubImageFilerØrÙ)rŠrærØú Image.Image)r0r1r2rBÚabcÚabstractmethodr}r$r'rrârâÅs!„ó ð    ×Ñò óñ r'râcód—eZdZdZej
dd„«Zdd„Zej
dd„«Zy)    ræz±
    Base class for stub image loaders.
 
    A stub loader is an image loader that can identify files of a
    certain format, but relies on external code to load the file.
    có—yrXr$rYs rrIzStubImageFile._openÖrÒr'cóê—|j«}|€d|j›d}t|«‚|j|«}|€J‚|j|_|j
|_|j«S)Nzcannot find loader for this z file)Ú_loadrrr}rVÚ__dict__)rTÚloaderrÚimages    rr}zStubImageFile.loadÚsj€Ø—‘“ˆØ ˆ>Ø0°·±° ¸UÐCˆCܘ#“,Ð Ø— ‘ ˜DÓ!ˆØÐ Ð Ð àŸ™ˆŒØŸ™ˆŒ ؏z‰z‹|Ðr'có—y)z (Hook) Find actual image loader.Nr$rYs rrízStubImageFile._loadæs€ð     r'NrÚrÝ)rØzStubHandler | None)    r0r1r2rßrèrérIr}rír$r'rræræÎs@„ñð    ×Ñò óð ó
ð    ×Ñò óñ r'ræ)Ú    metaclasscóp—eZdZUdZdZdZded<dZded<dZded<d    Z    d    Z
dd
„Z dd „Z dd „Z dd „Zdd„Zy)ÚParserzj
    Incremental image parser.  This class implements the standard
    feed/close consumer interface.
    NzImage.Image | Nonerðz bytes | Noner‰z,Image.core.ImagingDecoder | PyDecoder | Nonerrcó*—|jJd«‚y)zµ
        (Consumer) Reset the parser.  Note that you can only call this
        method immediately after you've created a parser; parser
        instances cannot be reused.
        Nzcannot reuse parsers)r‰rYs rÚresetz Parser.resetùs€ð y‰yРÐ8Ð"8Ó8Ñ r'cóT—|jry|j€||_n|j|z|_|jræ|jdkDrmt    t |j«|j«}|j|d|_|j|z
|_|jdkDs |jsy|jj |j«\}}|dkr(d|_d|_|dkrd|_t|d¬«‚y|j|d|_y|jry    tj|j«5}tj|«}ddd«td«xs t|d«}|st |j«dk7rd|_||_y|j«|jd\}}}    }
g|_tj |j"||
|j$«|_|jj'|j(|«|    |_|jt |j«kr%|j|jd|_d|_||_y#1swYŒ%xYw#t*$rYywxYw)z¦
        (Consumer) Feed data to the parser.
 
        :param data: A string buffer.
        :exception OSError: If the parser failed to parse the image file.
        NrrFr¥rœr›)Úfinishedr‰rr.Úminr•r»rðr rxryr
rBr¨r=r±r·rPr?r¸rŠr) rTr‰ÚskiprÍrÌrCrŠÚflagÚdÚoÚas            rÚfeedz Parser.feeds(€ð =Š=Ø à 9‰9Р؈DIàŸ    ™     DÑ(ˆDŒIð <Š<؏{‰{˜QŠäœ3˜tŸy™y›>¨4¯;©;Ó7Ø ŸI™I d eÐ,”    Ø"Ÿk™k¨DÑ0” Ø—;‘; ’?¨$¯)ª)Øà—<‘<×&Ñ& t§y¡yÓ1‰DˆAˆqà1Šuࠐ”    Ø !” ؐq’5à!%D”JÜ& q°%Ô8Ð8ðØŸ    ™     ! "˜ ˆDIà ZŠZð ð  Ü—Z‘Z §    ¡    Ó*ð(¨bÜŸ™ B›B÷(ô
˜r ;Ó/ÒK´7¸2¸{Ó3KÙœ3˜rŸw™w›<¨1Ò,à"&D”K𠐕
ð—O‘OÔ%Ø!#§¡¨¡‘JAq˜!˜QØ B”GÜ#(×#4Ñ#4°R·W±W¸aÀÀB×DTÑDTÓ#UD”LØ—L‘L×)Ñ)¨"¯%©%°Ô3ð#$D”KØ—{‘{¤c¨$¯)©)£nÒ4Ø$(§I¡I¨d¯k©k¨mÐ$<˜œ    Ø&'˜œ à•
÷/(ñ(ûäò Ùð ús*Ä6JÅJÅ+JÊJÊJÊ    J'Ê&J'có—|SrXr$rYs rÚ    __enter__zParser.__enter__Ms€Øˆ r'có$—|j«yrX)rS©rTr/s  rÚ__exit__zParser.__exit__Ps €Ø 
‰
 r'có,—|jr8|jd«dx|_|_|js d}t    |«‚|j
s d}t    |«‚|jrjt j|j«5}    tj|«|_|j
j«    ddd«|j
S|j
S#|j
j«wxYw#1swY|j
SxYw)a
        (Consumer) Close the stream.
 
        :returns: An image object.
        :exception OSError: If the parser failed to parse the image file either
                            because it cannot be identified or cannot be
                            decoded.
        r'Nzimage was incompletezcannot parse this image) rrÿr‰rørrðrxryr
rBr})rTrrCs   rrSz Parser.closeSsЀð <Š<à I‰IcŒNØ'+Ð +ˆDŒI˜œ Ø—=’=Ø,Ü˜c“lÐ"؏zŠzØ+ˆCܘ#“,Ð Ø 9Š9ô—‘˜DŸI™IÓ&ð &¨"ð&Ü!&§¡¨B£D”Jà—J‘J—O‘OÕ%÷     &ð
z‰zЈtz‰zÐøð—J‘J—O‘OÕ%ú÷     &ð
z‰zÐús$    C? C Â%C?àC<Ã<C?Ã?DrÚ)r‰rHrØrÙ)rØrô)r/ÚobjectrØrÙ)rØrç)r0r1r2rßÚ incrementalrðr3r‰rr.rørörÿrrrSr$r'rrôrôìsS…ñð
€KØ $€EÐ Ó$Ø€Dˆ,ÓØ<@€GÐ 9Ó@Ø €FØ€Hó9óJ óXóôr'rôc    ó¾—|j«t|d«sd|_|jt¬«t t ||jddz«}    |j«}|j«t|||||«t|d«r|j«yy#ttjf$r}t||||d|«Yd}~ŒLd}~wwxYw)z«Helper to save image based on tile list
 
    :param im: Image object.
    :param fp: File object.
    :param tile: Tile list.
    :param bufsize: Optional buffer size
    Ú encoderconfigr$r réNÚflush)r}r¨r    r²r&Úmaxr@rQr«r Ú _encode_tilerrxÚUnsupportedOperation)rŠrCr=ÚbufsizeÚfhÚexcs      rÚ_saverus¾€ð‡GG„IÜ 2Ô 'ØˆÔØ‡II”)€IÔô
”(˜G R§W¡W¨Q¡Z°!¡^Ó4€Gð7Ø Y‰Y‹[ˆØ
‰Œ
ܐR˜˜T 7¨BÔ/ôˆr7ÔØ
‰
ðøô œB×3Ñ3Ð 4ò7ܐR˜˜T 7¨D°#×6Ñ6ûð7úsÁ/B)Â)CÃCÃCcó<—|D]\}}}}    |dkDr|j|«tj|j||    |j«}
    |
j |j |«|
jr%|
j|«|
j«d} nE|r-    |
j|«dd\} } |j| «| rnŒ,|€J‚|
j||«} | dkrt| d¬«|‚    |
j«Œy#|
j«wxYw)NrrTr¥)rur
Ú _getencoderrPr    r¸rŠÚ    pushes_fdrºÚencode_to_pyfdÚencodeÚwriteÚencode_to_filer r½) rŠrCr=rrrÚ encoder_namer,r.r/rÚerrcoder‰s              rr r ‘s€ð04óÑ+ˆ g˜v tØ AŠ:Ø G‰GFŒOÜ×#Ñ# B§G¡G¨\¸4À×AQÑAQÓRˆð    Ø × Ñ ˜RŸU™U GÔ ,Ø× Ò Ø— ‘ ˜bÔ!Ø!×0Ñ0Ó2°1Ñ5‘áàØ(/¯©°wÓ(?ÀÀÐ(C™ ˜ ØŸ™ œÙ"Ø!ð    ð˜>Ð)˜>Ø%×4Ñ4°R¸ÓAGؘŠ{Ü" 7°DÔ9¸sÐBðð O‰OÖ ñ1øð0 O‰OÕ ús ÁB%D    Ä    Dcó‚—|dkry|tkr.|j|«}t|«|kr d}t|«‚|Sg}|}|dkDrG|jt    |t««}|sn%|j |«|t|«z}|dkDrŒGt d„|D««|kr d}t|«‚dj|«S)a»
    Reads large blocks in a safe way.  Unlike fp.read(n), this function
    doesn't trust the user.  If the requested size is larger than
    SAFEBLOCK, the file is read block by block.
 
    :param fp: File handle.  Must implement a <b>read</b> method.
    :param size: Number of bytes to read.
    :returns: A string containing <i>size</i> bytes of data.
 
    Raises an OSError if the file is truncated and the read cannot be completed
 
    rr'zTruncated File Readc3ó2K—|]}t|«–—Œy­wrX)r•)Ú.0Úblocks  rú    <genexpr>z_safe_read.<locals>.<genexpr>Ñsèø€Ò
*˜%Œ3ˆu:Ñ
*ùs‚)Ú    SAFEBLOCKrwr•rrùrlÚsumÚjoin)rCrQr‰rÚblocksÚremaining_sizers       rÚ
_safe_readr&´sǀð ˆq‚yØØ ŒyÒØw‰wt‹}ˆÜ ˆt‹9tÒ Ø'ˆCܘ#“,Р؈ Ø€FØ€NØ
˜1Ò
Ø—‘œ˜N¬IÓ6Ó7ˆÙØ Ø ‰ eÔØœ#˜e›*Ñ$ˆð ˜1Ó
ô  Ñ
* 6Ô
*Ó*¨TÒ1Ø#ˆÜc‹lÐØ 8‰8FÓ Ðr'có—eZdZdd„Zdd„Zy)Ú PyCodecStatecó<—d|_d|_d|_d|_y)Nr)ÚxsizeÚysizeÚxoffÚyoffrYs rr:zPyCodecState.__init__Øs€ØˆŒ
؈Œ
؈Œ    Øˆ    r'có’—|j|j|j|jz|j|jzfSrX)r,r-r*r+rYs rr,zPyCodecState.extentsÞs3€Øy‰y˜$Ÿ)™) T§Y¡Y°·±Ñ%;¸T¿Y¹YÈÏÉÑ=SÐSÐSr'NrÚ)rØztuple[int, int, int, int])r0r1r2r:r,r$r'rr(r(×s „óô Tr'r(cóN—eZdZUded<d    d„Zd
d„Zd d„Zd d„Z    d                     dd„Zy)ÚPyCodeczIO[bytes] | NoneÚfdcón—d|_t«|_d|_||_|j |«yrX)rŠr(r—r1rPÚinit)rTrPr/s   rr:zPyCodec.__init__ås+€Ø15ˆŒÜ!“^ˆŒ
؈ŒØˆŒ    Ø     ‰    $r'có—||_y)z—
        Override to perform codec specific initialization
 
        :param args: Tuple of arg items from the tile entry
        :returns: None
        N)r/rs  rr3z PyCodec.initìs €ðˆ    r'có—y)zT
        Override to perform codec specific cleanup
 
        :returns: None
        Nr$rYs rr½zPyCodec.cleanupõs€ð      r'có—||_y)z
        Called from ImageFile to set the Python file-like object
 
        :param fd: A Python file-like object
        :returns: None
        N)r1)rTr1s  rrºz PyCodec.setfdýs €ðˆr'Ncó—||_|r|\}}}}nd\}}}}|dk(r=|dk(r8|jj\|j_|j_nJ||j_||j_||z
|j_||z
|j_|jjdks|jjdkr d}t|«‚|jj|jj
z|jjdkDsG|jj|jj z|jjdkDr d}t|«‚y)zø
        Called from ImageFile to set the core output image for the codec
 
        :param im: A core image object
        :param extents: a 4 tuple of (x0, y0, x1, y1) defining the rectangle
            for this tile
        :returns: None
        )rrrrrzSize cannot be negativerz Tile cannot extend outside imageN)rŠrQr—r*r+r,r-r_)rTrŠr,Úx0Úy0Úx1Úy1rs        rr¸zPyCodec.setimages,€ðˆŒá Ø&Ñ ˆRR™à+Ñ ˆRR˜à Š7r˜Q’wØ15·±·±Ñ .ˆDJ‰JÔ ˜dŸj™jÕ.à ˆDJ‰JŒOØ ˆDJ‰JŒOØ! B™wˆDJ‰JÔ Ø! B™wˆDJ‰JÔ à :‰:× Ñ ˜qÒ   D§J¡J×$4Ñ$4¸Ò$9Ø+ˆCܘS“/Ð !ð J‰J× Ñ ˜tŸz™zŸ™Ñ .°·±·±¸a±Ò @؏z‰z×Ñ $§*¡*§/¡/Ñ1°D·G±G·L±LÀ±OÒCà4ˆCܘS“/Ð !ðDr')rPr)r/rrØrÙ)r/útuple[Any, ...]rØrÙrÚ)r1ú    IO[bytes]rØrÙrX)rŠzImage.core.ImagingCorer,r+rØrÙ)    r0r1r2r3r:r3r½rºr¸r$r'rr0r0âsB…ØÓóóó óð59ð'"à "ð'"ð2ð'"ð
ô    '"r'r0cóH—eZdZdZdZedd„«Zdd„Z    d                                d
d„Zy) Ú    PyDecoderzË
    Python implementation of a format decoder. Override this class and
    add the decoding logic in the :meth:`decode` method.
 
    See :ref:`Writing Your Own File Codec in Python<file-codecs-py>`
    Fcó—|jSrX)Ú    _pulls_fdrYs rr¹zPyDecoder.pulls_fd:s €à~‰~Ðr'có—d}t|«‚)a=
        Override to perform the decoding process.
 
        :param buffer: A bytes object with the data to be decoded.
        :returns: A tuple of ``(bytes consumed, errcode)``.
            If finished with decoding return -1 for the bytes consumed.
            Err codes are from :data:`.ImageFile.ERRORS`.
        zunavailable in base decoder©ÚNotImplementedError)rTÚbufferrs   rr»zPyDecoder.decode>ó€ð,ˆÜ! #Ó&Ð&r'Ncó^—|s |j}tj|jd||«}|j€J‚|j    |j|j
j ««|j|«}|ddk\r d}t|«‚|ddk7r d}t|«‚y)aS
        Convenience method to set the internal image from a stream of raw data
 
        :param data: Bytes to be set
        :param rawmode: The rawmode to be used for the decoder.
            If not specified, it will default to the mode of the image
        :param extra: Extra arguments for the decoder.
        :returns: None
        rNrznot enough image datarzcannot decode image data)    rPr
r·rŠr¸r—r,r»r_)rTr‰ÚrawmodeÚextrarürËrs       rÚ
set_as_rawzPyDecoder.set_as_rawJsŸ€ñØ—i‘iˆGÜ × Ñ ˜dŸi™i¨°¸Ó ?ˆØw‰wÐ"Ð"Ð"Ø    
‰
4—7‘7˜DŸJ™J×.Ñ.Ó0Ô1Ø H‰HT‹Nˆà ˆQ‰41Š9Ø)ˆCܘS“/Ð !Ø ˆQ‰41Š9Ø,ˆCܘS“/Ð !ð r'©rØrÞ)rEz$bytes | Image.SupportsArrayInterfacerØútuple[int, int])Nr$)r‰rHrHrÛrIr<rØrÙ)    r0r1r2rßrAÚpropertyr¹r»rJr$r'rr?r?0sQ„ñð€Ià òóðó
'ðQSð"Øð"Ø$.ð"Ø>Mð"à     ô"r'r?có>—eZdZdZdZedd„«Zd    d„Zd
d„Zd d„Z    y) Ú    PyEncoderzË
    Python implementation of a format encoder. Override this class and
    add the decoding logic in the :meth:`encode` method.
 
    See :ref:`Writing Your Own File Codec in Python<file-codecs-py>`
    Fcó—|jSrX)Ú
_pushes_fdrYs rrzPyEncoder.pushes_fdps €à‰Ðr'có—d}t|«‚)a 
        Override to perform the encoding process.
 
        :param bufsize: Buffer size.
        :returns: A tuple of ``(bytes encoded, errcode, bytes)``.
            If finished with encoding return 1 for the error code.
            Err codes are from :data:`.ImageFile.ERRORS`.
        zunavailable in base encoderrC)rTrrs   rrzPyEncoder.encodetrFr'có¤—|jsy|jd«\}}}|r)|j€J‚|jj|«||fS)zø
        If ``pushes_fd`` is ``True``, then this method will be used,
        and ``encode()`` will only be called once.
 
        :returns: A tuple of ``(bytes consumed, errcode)``.
            Err codes are from :data:`.ImageFile.ERRORS`.
        )rrr)rrr1r)rTÚbytes_consumedrr‰s    rrzPyEncoder.encode_to_pyfd€sP€ð~Š~ØØ(,¯ © °A«Ñ%ˆ˜ Ù Ø—7‘7Ð&Ð &Ð&Ø G‰GM‰M˜$Ô Ø˜wÐ&Ð&r'có†—d}|dk(r9|j|«\}}}|dkDrtj|||d«|dk(rŒ9|S)zì
        :param fh: File handle.
        :param bufsize: Buffer size.
 
        :returns: If finished successfully, return 0.
            Otherwise, return an error code. Err codes are from
            :data:`.ImageFile.ERRORS`.
        rN)rrDr)rTrrrÚstatusÚbufs      rrzPyEncoder.encode_to_filesP€ðˆØ˜ŠlØ#'§;¡;¨wÓ#7Ñ  ˆFG˜SؘŠzÜ—‘˜˜S  ˜\Ô*ð˜‹lðˆr'NrK)rr-rØztuple[int, int, bytes])rØrL)rr-rr-rØr-)
r0r1r2rßrQrMrrrrr$r'rrOrOfs/„ñð€Jà òóðó
'ó'ô r'rO)rr-rrÞrØr)r%r!rØr-)r)
rŠrçrCr=r=ú list[_Tile]rr-rØrÙrX)rŠrçrCr=r=rXrr-rz
int | NonerzBaseException | NonerØrÙ)rCr=rQr-rØrH)-Ú
__future__rrèrxr³ÚloggingrDrNÚtypingrrrrr8r    r
Ú_utilr r Ú TYPE_CHECKINGÚ_typingr Ú    getLoggerr0rcr@r!r¼rr r&r!r5ÚABCrâÚABCMetarærôrr r&r(r0r?rOr$r'rú<module>rbs_ðõ:#ã
Û    ÛÛÛ    Û ß,Ó,çß)à€ ÙÝ'à    ˆ×    Ñ    ˜8Ó    $€à €ð ð €    àÐØNð    %ØØØØñ 
€ðóóô
.ˆJô.ôP$— ‘ ôP$ôf
 #—'‘'ô ô I¨¯©õ ÷<CñCôRðD!%ð  Øð àð ð ð ðð     ð
    ð  ð
ð  ð
ó óF ÷FTñT÷K"ñK"ô\3"ô3"ôl8õ8r'