+
     i?  c                  s\   ^ RI Ht ^ RIHt ^ RIHt ^ RIHt ^RIH	t	H
t
 ^RIHt ^RIHt ^RIHt ^R	^R
/tR R ltR R ltR R ltR R ltR R lt ! R R]
P                  4      t]	P2                  ! ]P4                  ]4       ]	P6                  ! ]P4                  R4       R R ltR# )    )annotations)Sequence)BytesIO)cast)Image	ImageFile)i16be)i32be)	deprecaterawZjpegc                    V ^8  d   QhRRRR/# )   nameZstrreturnbytes format   ":/usr/lib64/python3.14/site-packages/PIL/IptcImagePlugin.py__annotate__r      s      c e     c                s\    V R 8X  d   \        R^4       R# R\         RV  R2p\        V4      h)ZPADzIptcImagePlugin.PAD       zmodule 'z' has no attribute 'Z')r	   __name__ZAttributeError)r   msg   & r   __getattr__r      s7    u}',XJ24&
:C

r   c               r   r   cr   r   intr   r   r   r   r   r   +   s     ' '% 'C 'r   c                s,    \        R V ,           RR 4      # )r   Ni)i32r      &r   _ir"   +   s    a%&&r   c               r   )r   r   zint | bytesr   r   r   r   r   r   r   r   /   s     - -; -3 -r   c                sD    \        V \        4      '       d   V # V ^ ,          # )r    )
isinstancer   r    r!   r   _i8r$   /   s    1c""1,!,r   c               r   r   r   r   r   r   r   r   3   s       3 r   c                s0    \        R^4       \        V 4      # ).. deprecated:: 10.2.0zIptcImagePlugin.i)r	   r"   r    r!   r   ir&   3   s    !2&a5Lr   c               r   )r   r   zSequence[int | bytes]r   Noner   r   r   r   r   r   9   s      ! d r   c                st    \        R^4       V  F  p\        \        V4      R RR7       K  	  \        4        R# )r%   zIptcImagePlugin.dumpZ02xZ )ZendN)r	   Zprintr$   )r   r&   r   r   dumpr(   9   s.    $b)Q3' 	Gr   c                  sN    ] tR t^FtRtRtR R ltR R ltR R ltR	 R
 lt	Rt
R# )IptcImageFileZIPTCzIPTC/NAAc               r   )r   keyztuple[int, int]r   r   r   r   r   r   r   IptcImageFile.__annotate__J   s     " "/ "c "r   c                	s:    \        V P                  V,          4      # )N)r"   info)selfr*   s   &&r   getintZIptcImageFile.getintJ   s    $))C.!!r   c                   V ^8  d   QhRR/# )r   r   z"tuple[tuple[int, int] | None, int]r   r   r   r   r   r+   M   s      9 r   c                	s   V P                   P                  ^4      pVP                  R4      '       g   R# V^,          V^,          3pV^ ,          ^8w  g   V^ ,          R9  d   Rp\        V4      hV^,          pV^8  d   Rp\	        V4      hV^8X  d   ^ pW$3# V^8  d/   \        V P                   P                  V^,
          4      4      pW$3# \        V^4      pW$3# )   s    zinvalid IPTC/NAA filez%illegal field length in IPTC/NAA file)Nr    )
   r      i   r0   i   i      i	   i   )fpreadZstripZSyntaxErrorOSErrorr"   i16)r-   stagr   sizes   &    r   fieldZIptcImageFile.fieldM   s     GGLLOwwwNdAaDj Q44<3q6)II)Cc"" t#:9C#,S[D y CZdggll4#:./D y q!9Dyr   c               r/   )r   r   r'   r   r   r   r   r   r+   i   s     / /t /r   c                	s    V P                   P                  4       pV P                  4       w  r#V'       d   VR8X  d   MV'       d   V P                   P                  V4      pMRpW P                  9   dp   \        V P                  V,          \        4      '       d%   V P                  V,          P                  V4       K  V P                  V,          V.V P                  V&   K  W@P                  V&   K  V P                  R,          ^ ,          pV P                  R,          ^,          pR	V P                  9   d#   V P                  R	,          ^ ,          ^,
          pM^ pV^8X  d   V'       g	   RV n        M;V^8X  d   V'       d   RV,          V n        MV^8X  d   V'       d   RV,          V n        V P                  R
4      V P                  R4      3V n
         \        V P                  R4      ,          pTR8X  d2   \        P                  ! RRT P                   ,           Y4      .T n        R# R#   \         d   p	Rp
\        T
4      T	hRp	?	ii ; i)TNZLZRGBZCMYKzUnknown IPTC image compressioniptcr3   i
   )r2   i<   )r2   iA   )r2   i   )r2   i   )r2   ix   )r    r    )r4   Ztellr;   r5   r,   r#   ZlistZappend_moder.   _sizeCOMPRESSIONKeyErrorr6   r   Z_Tiler:   tile)r-   offsetr9   r:   ZtagdataZlayersZ	componentZidcompressionZer      &          r   _openZIptcImageFile._openi   s   WW\\^F

IC#.'',,t,iidiind33IIcN))'2&*iing%>DIIcN!(		# 7#A&IIg&q)	dii7#A&*BBQ;yDJq[YrDJq[YDJ [[)4;;w+??
	&%dkk(&;<K '>(:FPDI   	&2C#,A%	&s   H, ,I
7II
c               r/   )r   r   zImage.core.PixelAccess | Noner   r   r   r   r   r+      s     & &3 &r   c                	sx   \        V P                  4      ^8w  g    V P                  ^ ,          ^ ,          R8w  d    \        P                  P                  V 4      # V P                  ^ ,          R,          w  rV P                  P                  V4       \        4       pVR8X  d#   VP                  RV P                  ,          4        V P                  4       w  rEVR8w  d   M]V^ 8  g   K$  V P                  P                  \        VR4      4      pV'       g   KS  VP                  V4       V\        V4      ,          pK]  \        P                  ! V4      ;_uu_ 4       pVP                  4        VP                  V n        RRR4       . V n        \        P                  P                  V 4      #   + '       g   i     L6; i)r1   r<   :r   NNr
   s   P5
%d %d
255
i    Nr=   )ZlenrB   r   loadr4   Zseekr   Zwriter:   r;   r5   Zminr   Zopenim)r-   rC   rD   ZoZtyper:   r8   Z_ims   &       r   rG   ZIptcImageFile.load   s/   tyy>Q$))A,q/V";&&++D11"iil2.V I% GG'$))34JDw(GGLLT41
AZZ]]cHHJffDG  	{{%%	 ]s   "F))F9	)r>   r?   rH   rB   N)r   
__module____qualname____firstlineno__r   Zformat_descriptionr.   r;   rF   rG   __static_attributes__r   r   r   r)   r)   F   s'    F#"8/b& &r   r)   z.iimc               r   )r   rH   zImageFile.ImageFiler   z1dict[tuple[int, int], bytes | list[bytes]] | Noner   r   r   r   r   r      s     ; ;;6;r   c                st   ^RI HpHp Rp/ p\        V \        4      '       dB   V P
                  P                  4        F!  w  rV\        V\        4      '       g   K  WdV&   K#  	  V# \        WP                  4      '       d6   V P
                  P                  R4      pV'       d   VP                  R4      pMC\        WP                  4      '       d)    V P                  P                  VP                  ,          pVf   R#  ! R R4      pV! 4       p	\        V	n        \!        \        V	4      p
/ V
n        \#        V4      V
n         V
P'                  4        V
P
                  P                  4        F!  w  rV\        V\        4      '       g   K  WdV&   K#  	  V#   \         d     Li ; i  \(        \        3 d     Lei ; i)z
Get IPTC information from TIFF, JPEG, or IPTC file.

:param im: An image containing IPTC data.
:returns: A dictionary containing IPTC information, or None if
    no IPTC information block was found.
)JpegImagePluginTiffImagePluginN	photoshopi  c                  s    ] tR t^tRtR# )getiptcinfo.<locals>.FakeImager   N)r   rI   rJ   rK   rL   r   r   r   	FakeImagerP      s    r   rQ   ) rM   rN   r#   r)   r,   ZitemsZtupleZJpegImageFileZgetZTiffImageFileZtag_v2Z_tagdataZIPTC_NAA_CHUNKrA   Z	__class__r   r   r4   rF   Z
IndexError)rH   rM   rN   Zdatar,   ZkZvrO   rQ   Zfake_imZiptc_imrE   r   getiptcinforS      si    3D79D"m$$GGMMODA!U##Q $ 	B55	6	6GGKK,	==(D	B55	6	6	99%%o&D&DED |  kG%G='*G GLGJ ""$aG % K5  		( ! s$   'F F# F F #F76F7N)Z
__future__r   Zcollections.abcr   Zior   Ztypingr   rR   r   r   Z_binaryr   r7   r   r   Z
_deprecater	   r@   r   r"   r$   r&   r(   r)   Zregister_openr   Zregister_extensionrS   r   r   r   <module>rT      s   " # $    ! ! !%F#'-q&I'' q&h   M((- 8   --v 6;r   