+
    /i_D                       R t ^ RIHt . RCOt^ RIHtHt ^ RIt]'       d   ^ RIHtH	t	 ^ RI
HtHtHt  ^ RItRDRRRR/R R	 llltRR/R
 R llt ^ RItRDRR/R R llltRR/R R llt ^ RIHt RDRR/R R llltRR/R R lltRR/R! R" llt]R#RER$^RR/R% R& ll4       t]R#RER$^RR/R' R( ll4       tR#RER$^RR/R) R* llt]R#RER$^RR/R+ R, ll4       t]R#RER$^RR/R- R. ll4       tR#RER$^RR/R/ R0 llt]RRR1. /R2 R3 ll4       t]RRR1. /R4 R5 ll4       t]RRR1. /R6 R7 ll4       tRRR1. /R8 R9 lltR:RR;^ RR/R< R= lltR:RR;^ RR/R> R? lltR@RRR/RA RB lltR#   ] d    RDRRRR/R R llltRR/R R llt EL5i ; i  ] d    RDRR/R R llltRR/R R llt EL>i ; i  ] d    RDRR/R R llltRR/R R  llt ELEi ; i)Fa   Fallback imagecodecs codecs.

This module provides alternative, pure Python and NumPy implementations of
some functions of the `imagecodecs`_ package. The functions may raise
`NotImplementedError`.

.. _imagecodecs: https://github.com/cgohlke/imagecodecs

)annotations)TYPE_CHECKINGoverloadN)AnyLiteral)	ArrayLike	DTypeLikeNDArraycheckoutc          
     ,    V ^8  d   QhRRRRRRRRRR	/# 
   level
int | Nonedatabytes | NDArray[Any]r
   r   r   returnbytes )formats   "S/var/www/html/photoedit/myenv/lib/python3.14/site-packages/tifffile/_imagecodecs.py__annotate__r   H   s<     # # #"#
 # # 
#    c                  ???\        V \        P                  4      '       d   V P                  4       p \        P
                  ! V 4      # )zCompress LZMA.

Parameters:
    data: Data to compress.
    level: Compression level (currently unused).
    check: Integrity check type (currently unused).
    out: Output buffer (currently unused).

)
isinstancenumpyndarraytobyteslzmacompress)r   r   r
   r   s   "&$$r   lzma_encoder!   H   s6    " 5#dEMM**<<>D}}T""r   c               $    V ^8  d   QhRRRRRR/# r   r   r   r   r   r   r   )r   s   "r   r   r   ^   !     	% 	%% 	%C 	%5 	%r   c              0    ?\         P                  ! V 4      # )zeDecompress LZMA.

Parameters:
    data: Compressed data.
    out: Output buffer (currently unused).

)r   
decompressr   r   s   "$r   lzma_decoder(   ^        t$$r   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# r   r   )r   s   "r   r   r   k   s<       "
   
r   c                  ? ???^ RI pR# Raise ImportError.Nr   r   )r   r   r
   r   r   s   "&$$ r   r!   r!   k   s     %r   c               $    V ^8  d   QhRRRRRR/# r#   r   )r   s   "r   r   r   y   !      % C 5 r   c                  ? ?^ RI pR# r,   r.   )r   r   r   s   "$ r   r(   r(   y       #r   c               (    V ^8  d   QhRRRRRRRR/# 	r   r   r   r   r   r   r   r   r   r   )r   s   "r   r   r      s8     B B B"B
 B 
Br   c                  ?\        V \        P                  4      '       d   V P                  4       p \        P
                  ! Yf   ^4      # T4      # )zCompress Zlib DEFLATE.

Parameters:
    data: Data to compress.
    level: Compression level (0-9, default 6).
    out: Output buffer (currently unused).

)r   r   r   r   zlibr    r   r   r   s   "&$r   zlib_encoder8      s>     dEMM**<<>D}}T1AA5AAr   c               $    V ^8  d   QhRRRRRR/# r#   r   )r   s   "r   r   r      r$   r   c              0    ?\         P                  ! V 4      # )zmDecompress Zlib DEFLATE.

Parameters:
    data: Compressed data.
    out: Output buffer (currently unused).

)r6   r&   r'   s   "$r   zlib_decoder;      r)   r   c               (    V ^8  d   QhRRRRRRRR/# r4   r   )r   s   "r   r   r      2       "
  
r   c                  ? ??^ RI pR# r,   r6   )r   r   r   r6   s   "&$ r   r8   r8      s     %r   c               $    V ^8  d   QhRRRRRR/# r#   r   )r   s   "r   r   r      r0   r   c                  ? ?^ RI pR# r,   r?   )r   r   r6   s   "$ r   r;   r;      r2   r   zstdc               (    V ^8  d   QhRRRRRRRR/# r4   r   )r   s   "r   r   r      s2     0 0 0"0
 0 
0r   c                  ?\        V \        P                  4      '       d   V P                  4       p \        P
                  ! WR7      # )zCompress ZSTD.

Parameters:
    data: Data to compress.
    level: Compression level.
    out: Output buffer (currently unused).

)r   )r   r   r   r   rC   r    r7   s   "&$r   zstd_encoderF      s2     dEMM**<<>D}}T//r   c               $    V ^8  d   QhRRRRRR/# r#   r   )r   s   "r   r   r      r$   r   c              0    ?\         P                  ! V 4      # )zeDecompress ZSTD.

Parameters:
    data: Compressed data.
    out: Output buffer (currently unused).

)rC   r&   r'   s   "$r   zstd_decoderI      r)   r   c               (    V ^8  d   QhRRRRRRRR/# r4   r   )r   s   "r   r   r      r=   r   c                  ? ??^ RI Hp R# r-   rB   r   compressionrC   )r   r   r   rC   s   "&$ r   rF   rF      s     %$r   c               $    V ^8  d   QhRRRRRR/# r#   r   )r   s   "r   r   r      r0   r   c                  ? ?^ RI Hp R# rL   rM   )r   r   rC   s   "$ r   rI   rI      s    #$r   c               $    V ^8  d   QhRRRRRR/# )r   encodedr   r   r   r   r   )r   s   "r   r   r      s!     ' 'U 's 'e 'r   c              P   ?. pVP                   p^ p  \        WV^,            4      ^,           pV^,          pV^8  d+   V! WV^,            RV,
          ,          4       V^,          pKV  V^8  g   K_  V! WW4,            4       W4,          pKy    \         d     Mi ; i\        T4      # )a  Decompress PackBits encoded byte string.

Parameters:
    encoded: PackBits encoded byte string.
    out: Output buffer (currently unused).

Returns:
    Decompressed byte string.

Examples:
    >>> packbits_decode(b'\x80\x80')  # NOP
    b''
    >>> packbits_decode(b'\x02123')
    b'123'
    >>> packbits_decode(
    ...     b'\xfe\xaa\x02\x80\x00\x2a\xfd\xaa\x03\x80\x00\x2a\x22\xf7\xaa'
    ... )[:-5]
    b'\xaa\xaa\xaa\x80\x00*\xaa\xaa\xaa\xaa\x80\x00*"\xaa\xaa\xaa\xaa\xaa'

i  )extendord	TypeErrorr   )rR   r   
out_extendins   "$   r   packbits_decoderZ      s    * 	
CJ	AGA&'!+AFA3w7q1u-q9:QS7qu-. :s   AB 2B BBaxisdistc          
     ,    V ^8  d   QhRRRRRRRRRR	/# 
r   r   bytes | bytearrayr[   intr\   r   r   r   r   r   )r   s   "r   r   r     <      
 	
  
 r   c                  R # Nr   r   r[   r\   r   s   "$$$r   delta_encodere          r   c          
     ,    V ^8  d   QhRRRRRRRRRR/# 	r   r   NDArray[Any]r[   r`   r\   r   r   r   r   )r   s   "r   r   r   *  4      
$'47BEr   c                  R # rc   r   rd   s   "$$$r   re   re   )       r   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# 
r   r    bytes | bytearray | NDArray[Any]r[   r`   r\   r   r   r   r   r   )r   s   "r   r   r   /  s<     , ,
*, 	,
 , 
, ,r   c                 ?V^8w  d   RV: R2p\        V4      h\        V \        \        34      '       dl   \        P
                  ! V \        P                  R7      p \        P                  ! V ^ R7      p\        P                  ! V^ V ^ ,          4      P                  4       # V P                  pVP                  R8X  d+   V P                  VP                   RVP                   24      p \        P                  ! WR7      p\        R4      .V P                   ,          p^ Wq&   \        P                  ! V^ V \#        V4      ,          VR7      pV P                  P$                  '       g<   VP'                  RR	7      pVP                  VP                  P)                  4       4      pVP                  R8X  d   VP                  V4      # V# )
a|  Encode Delta.

Encode differences between consecutive samples along axis.

Parameters:
    data: Data to encode.
    axis: Axis along which to compute differences (default -1).
    dist: Distance between samples (only dist=1 is supported).
    out: Output buffer (currently unused).

Returns:
    Encoded data.
    Returns bytes for bytes/bytearray input, numpy array otherwise.

zdelta_encode with dist=# requires the 'imagecodecs' packagedtype)r[   fuNT)inplace)NotImplementedErrorr   r   	bytearrayr   
frombufferuint8diffinsertr   rs   kindview	byteorderitemsizeslicendimtupleisnativebyteswapnewbyteorder)r   r[   r\   r   msgr{   rs   keys   "$$$    r   re   re   /  sY   . 	qy(4')LM!#&&$	*++EKK8zz$Q'||D!T!W-5577JJEzzSyyEOO,Aenn-=>?::d&D#Dk]TYY6CCI<<aeCj!1=D::}}T}*yy0023zzSyyKr   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# r^   r   )r   s   "r   r   r   _  ra   r   c                  R # rc   r   rd   s   "$$$r   delta_decoder   ^  rf   r   c          
     ,    V ^8  d   QhRRRRRRRRRR/# rh   r   )r   s   "r   r   r   j  rj   r   c                  R # rc   r   rd   s   "$$$r   r   r   i  rl   r   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# rn   r   )r   s   "r   r   r   o  s<     - -
*- 	-
 - 
- -r   c              J   V^8w  d   RV: R2p\        V4      hVe   VP                  P                  '       g   Rp\        V \        \
        34      '       d]   \        P                  ! V \        P                  R7      p \        P                  ! V ^ \        P                  VR7      P                  4       # V P                  P                  R8X  d   V P                  P                  '       g   RV P                  : R2p\        V4      hV P                  V P                  P                   RV P                  P                    24      p\        P                  ! WQVP                  R	7      pVP                  V P                  4      # \        P                  ! WV P                  VR7      # )
a}  Decode Delta.

Decode delta-encoded data by computing cumulative sum along axis.

Parameters:
    data: Encoded data.
    axis: Axis along which to compute cumulative sum (default -1).
    dist: Distance between samples (only dist=1 is supported).
    out: Output buffer for results.

Returns:
    Decoded data.
    Returns bytes for bytes/bytearray input, numpy array otherwise.

zdelta_decode with dist=rq   Nrr   )r[   rs   r   rt   zdelta_decode with ru   )r[   rs   )rw   flags	writeabler   r   rx   r   ry   rz   cumsumr   rs   r}   r   r~   r   r   )r   r[   r\   r   r   r~   s   "$$$  r   r   r   o  sF   . qy(4')LM!#&&
syy222$	*++EKK8||q

')	 zz#zz"""$TZZN 35 5  &c**yyDJJ0014::3F3F2GHI||D4::>yy$$<<tzzs r   	_bitorderc               (    V ^8  d   QhRRRRRRRR/# )r   r   rx   r   r   r   	list[Any]r   r   )r   s   "r   r   r     s2      
 
	
  r   c                  R # rc   r   r   r   r   s   "$$r   bitorder_decoder     s     r   c               (    V ^8  d   QhRRRRRRRR/# )r   r   r   r   r   r   r   r   r   )r   s   "r   r   r     s2      
 
	
  r   c                  R # rc   r   r   s   "$$r   r   r     s     r   c               (    V ^8  d   QhRRRRRRRR/# )r   r   ri   r   r   r   r   r   r   )r   s   "r   r   r     s2      
 
	
  r   c                  R # rc   r   r   s   "$$r   r   r     s     r   c               (    V ^8  d   QhRRRRRRRR/# )r   r   ro   r   r   r   r   r   r   )r   s   "r   r   r     s2     : :
*: 
	:
 : &:r   c                 ?V'       gN   VP                  R4       VP                  \        P                  ! V^ ,          \        P                  R7      4       \	        V \
        \        34      '       d   V P                  V^ ,          4      #  V P                  R4      p\        P                  ! V^,          W3R7       V #   \         d   pRp\        T4      ThRp?ii ; i)a  Reverse bits in each byte of bytes or numpy array.

Decode data where pixels with lower column values are stored in the
lower-order bits of the bytes (TIFF FillOrder is LSB2MSB).

Parameters:
    data:
        Data to be bit-reversed.
        If bytes type, a new bit-reversed bytes is returned.
        NumPy arrays are bit-reversed in-place.
    out:
        Output buffer (currently unused).
    _bitorder:
        Internal caching parameter (not for public use).

Examples:
    >>> bitorder_decode(b'\x01\x64')
    b'\x80&'
    >>> data = numpy.array([1, 666], dtype='uint16')
    >>> _ = bitorder_decode(data)
    >>> data
    array([  128, 16473], dtype=uint16)

s    @ `P0pH(hX8xD$dT4tL,l\<|B"bR2r
J*jZ:zF&fV6vN.n^>~A!aQ1q	I)iY9yE%eU5uM-m]=}C#cS3sK+k[;{G'gW7wO/o_?rr   rz   )r   z<bitorder_decode of slices requires the 'imagecodecs' packageN)appendr   ry   rz   r   r   rx   	translater~   take
ValueErrorrw   )r   r   r   r~   excr   s   "$$   r   r   r     s    > 	!	
  	)))A,ekkJK$	*++~~il++0yy!

9Q<0 K  0L!#&C/0s   0B> >C	CCbitorderrunlenc               4    V ^8  d   QhRRRRRRRRR	RR
RRR/# )r   r   r   rs   zDTypeLike | Nonebitspersampler`   r   
str | Noner   r   r   r   ri   r   )r   s   "r   r   r     sN     3# 3#
3#3# 3# 3# 3# 
3# 3#r   c                 ??V^8X  d   \         P                  ! V R4      p\         P                  ! V4      pV^ 8  dT   V^,          '       dE   VP                  RV^V^,          ,
          ,           34      pVRRV13,          P                  R4      pVP	                  V4      # VR9   d   \         P                  ! W4      # RV R2p\        V4      h)a  Decompress bytes to array of integers.

This implementation only handles itemsizes 1, 8, 16, 32, and 64 bits.
Install the Imagecodecs package for decoding other integer sizes.

Parameters:
    data:
        Data to decompress.
    dtype:
        Numpy boolean or integer type.
    bitspersample:
        Number of bits per integer.
    bitorder:
        Bit order (currently unused).
    runlen:
        Number of consecutive integers after which to start at next byte.
    out:
        Output buffer (currently unused).

Returns:
    Array of unpacked integers.

Examples:
    >>> packints_decode(b'a', 'B', 1)
    array([0, 1, 1, 0, 0, 0, 0, 1], dtype=uint8)

z|B:NNNNzpackints_decode of z0-bit integers requires the 'imagecodecs' package)          @   )r   ry   
unpackbitsreshapeastyperw   )r   rs   r   r   r   r   
data_arrayr   s   """$$$  r   packints_decoder     s    J 	#%%dD1
%%j1
A:&1**#++R1vz>1J,KLJ#AwwJ/77;J  ''',,
m_ -- 	-  c
""r   c               0    V ^8  d   QhRRRRRRRRRR	R
R/# )r   r   r   r   r`   r   r   r   r   r   r   r_   r   )r   s   "r   r   r   0  sD     # #
##
 # # 
# #r   c                  Rp\        V4      h)aU  Tightly pack integers.

Parameters:
    data:
        Array of integers to pack.
    bitspersample:
        Number of bits per integer.
    bitorder:
        Bit order (currently unused).
    runlen:
        Number of consecutive integers after which to start at next byte.
    out:
        Output buffer.

Returns:
    Packed byte string.

z2packints_encode requires the 'imagecodecs' packagerw   )r   r   r   r   r   r   s   ""$$$ r   packints_encoder   0  s    6 ?C
c
""r   r   c               (    V ^8  d   QhRRRRRRRR/# )	r   r   r   r   zLiteral['>', '<'] | Noner   r   r   ri   r   )r   s   "r   r   r   O  s2     # #
# (	#
 
# #r   c                  Rp\        V4      h)zReturn float32 array from float24.

Parameters:
    data: Bytes containing float24 values.
    byteorder: Byte order, either '>' (big-endian) or '<' (little-endian).
    out: Output buffer (currently unused).

Returns:
    Array of float32 values.

z1float24_decode requires the 'imagecodecs' packager   )r   r   r   r   s   "$$ r   float24_decoder   O  s    $ >C
c
""r   )r   r   re   r   r(   r!   rZ   r   r   r;   r8   rI   rF   rc   r   ) __doc__
__future__r   __all__typingr   r   r   r   r   numpy.typingr   r   r	   r   r!   r(   ImportErrorr6   r8   r;   rN   rC   rF   rI   rZ   re   r   r   r   r   r   r   r   r   <module>r      sh  @ #  + #::9#
 !# # #,	%$ 	%F7B
 B B(	%$ 	%F6 0
 0 0(	%$ 	%D'T 'T 
 	
   
 
*,:;HL 

, 	,
 , ,^ 
 	
   
 
*,:;HL 

- 	-
 - -` 
 	
  
 
 	
  
 
 	
  
: 	:
 :z3#  3# 3# 3#l#
  # # #># +/	#
 # #M  
 !  $  !t  
  $  !t  
  $  s5   E# F	 ,F- #FF	F*)F*-GG