+
    UBiu0                       ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIHt ^RIH	t	H
t
HtHt ]P                  ! R4      t]'       d   ^RIHt Rt^tR R	 ltR
 R ltR R ltR R ltR R lt ! R R4      t ! R R]
P                  4      tR R ltR R lt]	P6                  ! ]P8                  ]]4       ]	P:                  ! ]P8                  R4       ]	P<                  ! ]P8                  ]4       ]	P>                  ! ]P8                  R4       ] R8X  Ed   ]!! ]PD                  4      ^8  d   ]#! R4       ]PH                  ! 4        ]%! ]PD                  ^,          R4      ;_uu_ 4       t&]! ]&4      t']'PP                  R,           F+  t)]);w  t*t+t,]'n)        ]'P[                  R ]* R!]+ R!], R"24       K-  	  ]	PJ                  ! ]PD                  ^,          4      ;_uu_ 4       t.].P[                  R#4       RRR4       ]P^                  R$8X  d   ]P`                  ! R#4       RRR4       R# R#   + '       g   i     L?; i  + '       g   i     R# ; i)%    )annotationsN)IO)Image	ImageFilePngImagePluginfeaturesjpg_2000)Jpeg2KImagePlugins   icnsc                    V ^8  d   QhRRRR/# )   fobj	IO[bytes]returnztuple[bytes, int] )formats   "8/usr/lib/python3.14/site-packages/PIL/IcnsImagePlugin.py__annotate__r   %   s     8 8Y 8#4 8    c                V    \         P                  ! R V P                  \        4      4      # )z>4sI)structunpackread
HEADERSIZE)r   s   &r   
nextheaderr   %   s    ==:!677r   c               (    V ^8  d   QhRRRRRRRR/# 	r   r   r   start_lengthtuple[int, int]sizetuple[int, int, int]r   dict[str, Image.Image]r   )r   s   "r   r   r   )   s,     
8 
8

8#2
8:N
8
8r   c                    Vw  r4V P                  V4       V P                  ^4      pVR8w  d   Rp\        V4      h\        W^,           V^,
          3V4      # )   s       z'Unknown signature, expecting 0x00000000)seekr   SyntaxErrorread_32)r   r   r   startlengthsigmsgs   &&&    r   read_32tr+   )   sW     #OUIIe
))A,C
!!7#4!)VaZ0$77r   c               (    V ^8  d   QhRRRRRRRR/# r   r   )r   s   "r   r   r   6   s,     * *
*#2*:N**r   c           
        Vw  r4V P                  V4       V^ ,          V^,          ,          V^,          V^,          ,          3pV^ ,          V^,          ,          pWF^,          8X  d1   V P                  V4      p\        P                  ! RWWRR^ ^4      pRV/# \        P                  ! RVR4      p\        ^4       EF,  p	. p
TpV^ 8  d   V P                  ^4      pV'       g   MV^ ,          pV^,          '       d?   V^},
          pV P                  ^4      p\        V4       F  pV
P                  V4       K  	  M)V^,           pV
P                  V P                  V4      4       W,          pV^ 8:  g   K   V^ 8w  d   R\        V4       R2p\        V4      h\        P                  ! RVRP                  V
4      RR^ ^4      pVP                  P                  VP                  V	4       EK/  	  RV/# )zb
Read a 32bit RGB icon resource.  Seems to be either uncompressed or
an RLE packbits-like scheme.
RGBrawNzError reading channel [z left]Lr   )r$   r   r   
frombuffernewrangeappendreprr%   joinimputband)r   r   r   r'   r(   
pixel_sizesizesqindatar7   band_ixdata	bytesleftbytebyte_int	blocksizeir*   bands   &&&               r   r&   r&   6   s    #OUIIeq'DG#T!WtAw%67J]Z]*F!6"eZq!L8 2;3 YYuj$/QxGDIa-yy|7d?? (3I99Q<D"9-D) . !)1IKK		) 45&	>A~/Y/@G!#&&##CSXXd^UCQRTUVDEEMM$''7+/  0 2;r   c               (    V ^8  d   QhRRRRRRRR/# r   r   )r   s   "r   r   r   c   s,     	 	
	#2	:N		r   c           	        V^ ,          pV P                  V4       V^ ,          V^,          ,          V^,          V^,          ,          3pV^ ,          V^,          ,          p\        P                  ! RW@P                  V4      RR^ ^4      pRV/# )r   r0   r/   A)r$   r   r1   r   )r   r   r   r'   r9   r:   rC   s   &&&    r   read_mkrG   c   s|     OEIIeq'DG#T!WtAw%67J]Z]*FCYYv->sAqQD;r   c               (    V ^8  d   QhRRRRRRRR/# r   r   )r   s   "r   r   r   o   s,     " "
"#2":N""r   c                   Vw  r4V P                  V4       V P                  ^4      pVP                  R4      '       dL   V P                  V4       \        P                  ! V 4      p\
        P                  ! VP                  4       RV/# VP                  R4      '       g   VR8X  d   \        '       g   Rp\        V4      hV P                  V4       V P                  V4      p\        P                  ! V4      p	\        P                  ! V	4      p\
        P                  ! VP                  4       VP                  R8w  d   VP                  R4      pRV/# Rp\        V4      h)   s   PNG

RGBAs      jP  

zQUnsupported icon subimage format (rebuild PIL with JPEG 2000 support to fix this)z Unsupported icon subimage format)s   OQs   

)r$   r   
startswithr   PngImageFiler   _decompression_bomb_checkr   enable_jpeg2k
ValueErrorioBytesIOr
   Jpeg2KImageFilemodeconvert)
r   r   r   r'   r(   r)   r7   r*   
jp2kstreamfs
   &&&       r   read_png_or_jpeg2000rX   o   s    #OUIIe
))B-C ~~011		%((.''0|ABB99}6  S/!		%YYv&
JJz"..q1''077fF#B|0or   c                      ] tR t^tR R]3.R!R]3.R"R]3.R#R]3.R$R]3.R%R]3R]3R]3.R&R	]3.R'R
]3.R(R]3R]3.R)R]3R]3R]3.R*R]3.R+R]3R]3R]3./tR R lt	R R lt
R R ltR R ltR,R R lltRtR# )-IcnsFile   ic10   ic09   ic14   ic08   ic13   ic07s   it32s   t8mks   icp6   ic12s   ih32s   h8mks   icp5s   il32s   l8mk   ic11s   icp4s   is32s   s8mkc                    V ^8  d   QhRRRR/# )r   r   r   r   Noner   )r   s   "r   r   IcnsFile.__annotate__   s      Y 4 r   c                x   / V n         Wn        \        V4      w  r#\        V4      '       g   Rp\	        V4      h\
        pWS8  dv   \        V4      w  r&V^ 8:  d   Rp\	        V4      hV\
        ,          pV\
        ,          pWV3V P                   V&   VP                  V\        P                  4       WV,          pK{  R# )z0
fobj is a file-like object as an icns resource
znot an icns filezinvalid block headerN)	dctr   r   _acceptr%   r   r$   rQ   SEEK_CUR)selfr   r)   filesizer*   rB   rA   s   &&     r   __init__IcnsFile.__init__   s    
 	"4(s||$Cc""l'-NCA~,!#&&OA#INDHHSMIIi-NA r   c                   V ^8  d   QhRR/# )r   r   zlist[tuple[int, int, int]]r   )r   s   "r   r   re      s      5 r   c                	    . pV P                   P                  4        F4  w  r#V F)  w  rEW@P                  9   g   K  VP                  V4        K2  	  K6  	  V# N)SIZESitemsrg   r4   )rj   sizesr   fmtsfmtreaders   &     r   	itersizesIcnsFile.itersizes   sK    ****,JD#((?LL&  $ -
 r   c                   V ^8  d   QhRR/# )r   r   r    r   )r   s   "r   r   re      s      . r   c                	b    V P                  4       pV'       g   R p\        V4      h\        V4      # )zNo 32bit icon resources found)rw   r%   max)rj   rs   r*   s   &  r   bestsizeIcnsFile.bestsize   s+     1Cc""5zr   c                    V ^8  d   QhRRRR/# )r   r   r    r   r!   r   )r   s   "r   r   re      s       4 9O r   c                    / pV P                   V,           FH  w  r4V P                  P                  V4      pVf   K&  VP                  V! V P                  WQ4      4       KJ  	  V# )z
Get an icon resource as {channel: array}.  Note that
the arrays are bottom-up like windows bitmaps and will likely
need to be flipped or transposed in some way.
)rq   rg   getupdater   )rj   r   rg   coderv   descs   &&    r   dataforsizeIcnsFile.dataforsize   sW      JJt,,LD88<<%D

6$))T89 - 
r   Nc                    V ^8  d   QhRRRR/# )r   r   z-tuple[int, int] | tuple[int, int, int] | Noner   Image.Imager   )r   s   "r   r   re      s      A	r   c                	R   Vf   V P                  4       pM#\        V4      ^8X  d   V^ ,          V^,          ^3pV P                  V4      pVP                  R4      pV'       d   V# VR,          P	                  4       p VP                  VR,          4       V#   \         d     T# i ; i)NrK   r.   rF   )r|   lenr   r   copyputalphaKeyError)rj   r   channelsr7   s   &&  r   getimageIcnsFile.getimage   s     <==?DY!^GT!Wa(D##D)\\&!Ie_!!#	KK& 	  			s   =B B&%B&)rg   r   )   r   r   )r   r      )   r   r   )r   r   r   )   r   r   )r   r   r   )@   r   r   )    r   r   )0   r   r   )r   r   r   )   r   r   )r   r   r   rp   )__name__
__module____qualname____firstlineno__rX   r+   rG   r&   rq   rl   rw   r|   r   r   __static_attributes__r   r   r   rZ   rZ      s   "678"678"678"678"678*+hg

 	w 456w 456w(7G*<=*+gg

 	w 456*+gg
)E6. r   rZ   c                  ~    ] tR t^tRtRtRtR R lt]R R l4       t	]	P                  R R	 l4       t	RR R lltRtR
# )IcnsImageFilea  
PIL image support for Mac OS .icns files.
Chooses the best resolution, but will possibly load
a different size image if you mutate the size attribute
before calling 'load'.

The info dictionary has a key 'sizes' that is a list
of sizes that the icns file has.
ICNSzMac OS icns resourcec                   V ^8  d   QhRR/# )r   r   rd   r   )r   s   "r   r   IcnsImageFile.__annotate__  s     
 
t 
r   c                	   \        V P                  4      V n        R V n        V P                  P	                  4       V P
                  R&   V P                  P                  4       V n        V P                  ^ ,          V P                  ^,          ,          V P                  ^,          V P                  ^,          ,          3V n        R# )rK   rs   N)	rZ   fpicns_moderw   infor|   	best_sizer   rj   s   &r   _openIcnsImageFile._open  s    TWW%	
!YY002		'++-NN1q 11NN1q 11
	r   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r     s      o r   c                	    V P                   # rp   )_sizer   s   &r   r   IcnsImageFile.size  s    zzr   c                    V ^8  d   QhRRRR/# )r   valuer   r   rd   r   )r   s   "r   r   r     s     
 
/ 
d 
r   c                	$   V P                   R ,           Fm  pV^ ,          V^,          ,          V^,          V^,          ,          3pV^ ,          V^ ,          ,          pV^,          V^,          ,          V8X  g   Kf  Wn         R# 	  Rp\        V4      h)rs   Nz2This is not one of the allowed sizes of this image)r   r   rP   )rj   r   r   simple_sizescaler*   s   &&    r   r   r     s     IIg&&Dq'DG+T!WtAw->>KNeAh.E1~a(E1"
 ' Cor   Nc                    V ^8  d   QhRRRR/# )r   r   z
int | Noner   zImage.core.PixelAccess | Noner   )r   s   "r   r   r   &  s      * 0M r   c                	   Ve4   V P                   R,          w  r#W!,          W1,          3V n         W#V3V n        \        P                  P                  V 4      pV P                  e(   V P
                  P                   V P                   8X  d   V# V P                  4        V P                  P                  V P                  4      pVP                  4       pVP
                  V n        VP                  V n
        VP                   V n         V# )N:Nr   N)r   r   r   load_imr7   load_preparer   r   rT   r   )rj   r   widthheightpxr7   s   &&    r   r   IcnsImageFile.load&  s     IIbMMEv~5DI"E1DN[[d#88DGGLLDII$=IYY/ WWY%%WW
GG		r   )r   r   r   r   r7   r   rp   )r   r   r   r   __doc__r   format_descriptionr   propertyr   setterr   r   r   r   r   r   r      sO     F/
   
[[
 
 r   r   c               (    V ^8  d   QhRRRRRRRR/# )	r   r7   r   r   r   filenamezstr | bytesr   rd   r   )r   s   "r   r   r   >  s(     9 9k 9y 9K 9D 9r   c                   \        VR4      '       d   VP                  4        R^RRRRRRR	^ R
^@RRRR/pV P                  P                  R. 4       U u/ uF  q P                  V bK  	  pp / p\        VP                  4       4       F\  pWd9   d	   WF,          MX P                  Wf34      p\        P                  ! 4       pVP                  VR4       VP                  4       WV&   K^  	  . p	VP                  4        F5  w  rWV,          pV	P                  V
\        \        V4      ,           V34       K7  	  VP!                  \"        4       \        pV\        ^\        V	4      ,          ,           ,          pV\%        R V	 4       4      ,          pVP!                  \&        P(                  ! RV4      4       VP!                  R4       VP!                  \&        P(                  ! R\        \        V	4      \        ,          ,           4      4       V	 FH  pVP!                  V^ ,          4       VP!                  \&        P(                  ! RV^,          4      4       KJ  	  V	 F`  pVP!                  V^ ,          4       VP!                  \&        P(                  ! RV^,          4      4       VP!                  V^,          4       Kb  	  \        VR4      '       d   VP                  4        R# R# u up i )zU
Saves the image as a series of PNG files,
that are then combined into a .icns file.
flushr`   r^   r   r\   r   r[   i   rb   ra   r_   r]   append_imagespngc              3  2   "   T F  q^,          x  K  	  R# 5i)r   Nr   ).0entrys   & r   	<genexpr>_save.<locals>.<genexpr>f  s     5WEQxxWs   z>is   TOC N)hasattrr   encoderinfor   r   setvaluesresizerQ   rR   savegetvaluerr   r4   r   r   writeMAGICsumr   pack)r7   r   r   rs   provided_imagessize_streamsr   imagetempentriestypestreamfile_lengthr   s   &&&           r   _saver   >  sG   
 r7

 		E /1nn.@.@RT.UV.Uxx|.UOVLELLN# & !D<( 	 zz|

4!]]_ $ Gkkm
#j3v;6?@ $
 HHUOK:CL 000K35W555KHHV[[{+, HHWHHV[[zCL:,EEFG
q
T58,- 
 
q
T58,-
q 
 r7

 M Ws   Kc                    V ^8  d   QhRRRR/# )r   prefixbytesr   boolr   )r   s   "r   r   r   z  s     $ $E $d $r   c                ,    V P                  \        4      # rp   )rL   r   )r   s   &r   rh   rh   z  s    U##r   z.icnsz
image/icns__main__z)Syntax: python3 IcnsImagePlugin.py [file]rbrs   zout--z.pngzout.pngwindows)1
__future__r   rQ   osr   systypingr    r   r   r   r   check_codecrO   r
   r   r   r   r+   r&   rG   rX   rZ   r   r   rh   register_openr   register_extensionregister_saveregister_mimer   r   argvprintexitopenr   imfr   r   r   r   r   r   r7   platform	startfiler   r   r   <module>r      s  & # 	 	  
  8 8$$Z0#
8
8*Z	"Jb bR>I'' >B9x$   M((- A   --w 7   M((% 0   M((, 7z
388}q9:
	chhqk4	 	 BBHHW%%D.22 E6538HHtE7!F81UG489 & ZZ$$GGI %<<9$LL# 
!	   %$ 
!	 	 s%   %A6H7H$	-+H7$H4/H77I	