K i* UddlmZddlZddlZddlZddlZddlmZddlZddl m Z dddd d d d Z d*d Z d+dZ d,dZdddddZd*dZd+dZd,dZddddddddd Zd!ed"<d-d#Zd+d$Zd,d%Zd-d&Zd+d'Zd,d(Zd.d/d)Zy)0) annotationsN)IO)Image) PIL._imagingPILLOW_VERSION)zPIL._tkinter_finder tk_version)PIL._imagingftfreetype2_version)zPIL._imagingcmslittlecms_version)z PIL._webpwebpdecoder_version)z PIL._aviflibavif_version)piltkinter freetype2 littlecms2webpavifc|tvrd|}t|t|\}} t|y#t$rYyt$r(}t j t|Yd}~yd}~wwxYw)z Checks if a module is available. :param feature: The module to check for. :returns: ``True`` if available, ``False`` otherwise. :raises ValueError: If the module is not defined in this version of Pillow. zUnknown module TFN)modules ValueError __import__ModuleNotFoundError ImportErrorwarningswarnstr)featuremsgmoduleverexs R/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/PIL/features.py check_moduler$sngy)o'"KFC6   c"gs 2 A-A-A((A-cbt|syt|\}}tt||g|S)z :param feature: The module to check for. :returns: The loaded version number as a string, or ``None`` if unknown or not available. :raises ValueError: If the module is not defined in this version of Pillow. Nfromlist)r$rgetattrr)rr r!s r#version_moduler)/s3  '"KFC :fu5s ;;cLtDcgc]}t|s|c}Scc}w)z4 :returns: A list of all supported modules. )rr$fs r#get_supported_modulesr.>s 2!,q/A 22 2!!)jpegjpeglib)jpeg2kjp2klib)zipzlib)libtiffr6)jpgjpg_2000r5r6c|tvrd|}t|t|\}}|dttjvS)z Checks if a codec is available. :param feature: The codec to check for. :returns: ``True`` if available, ``False`` otherwise. :raises ValueError: If the codec is not defined in this version of Pillow. zUnknown codec _encoder)codecsrdirrcore)rrcodeclibs r# check_codecr@MsIfwi(oJE3WH UZZ 00r*ct|syt|\}}ttj|d}|dk(r&|j ddj ddS|S)a :param feature: The codec to check for. :returns: The version number as a string, or ``None`` if not available. Checked at compile time for ``jpg``, run-time otherwise. :raises ValueError: If the codec is not defined in this version of Pillow. N_versionr6 rzVersion r)r@r;r(rr=split)rr>r?versions r# version_codecrF^sd w JE3ejjSE"23G)}}T"1%++J7:: Nr*cLtDcgc]}t|s|c}Scc}w)z3 :returns: A list of all supported codecs. )r;r@r,s r#get_supported_codecsrHss 0!QA 00 0r/)r HAVE_RAQM raqm_version)r HAVE_FRIBIDIfribidi_version)r HAVE_HARFBUZZharfbuzz_version)rHAVE_LIBJPEGTURBOlibjpeg_turbo_version)r HAVE_MOZJPEGrP)r HAVE_ZLIBNGzlib_ng_version)rHAVE_LIBIMAGEQUANTimagequant_version)rHAVE_XCBN)raqmfribidiharfbuzz libjpeg_turbomozjpegzlib_ng libimagequantxcbz&dict[str, tuple[str, str, str | None]]featuresc|tvrd|}t|t|\}}} t|dg}t||S#t$rYyt $r(}t jt|Yd}~yd}~wwxYw)z Checks if a feature is available. :param feature: The feature to check for. :returns: ``True`` if available, ``False`` if unavailable, ``None`` if unknown. :raises ValueError: If the feature is not defined in this version of Pillow. zUnknown feature PILr&N) r_rrr(rrrrr)rrr flagr!imported_moduler"s r# check_featurerdsh  *o )FD#$Vug>--   c"gsA A< A<A77A<cjt|syt|\}}}|ytt||g|S)z :param feature: The feature to check for. :returns: The version number as a string, or ``None`` if not available. :raises ValueError: If the feature is not defined in this version of Pillow. Nr&)rdr_r(r)rr rbr!s r#version_featurerfs>  ! )FD# { :fu5s ;;r*cLtDcgc]}t|s|c}Scc}w)z5 :returns: A list of all supported features. )r_rdr,s r#get_supported_featuresrhs 4!=#3A 44 4r/c|tvr t|S|tvr t|S|tvr t |St jd|ddy)z :param feature: A module, codec, or feature name. :returns: ``True`` if the module, codec, or feature is available, ``False`` or ``None`` otherwise. zUnknown feature 'z'.) stacklevelF)rr$r;r@r_rdrrrs r#checkrmsX'G$$&7##(W%% MM%gYb1a@ r*cv|tvr t|S|tvr t|S|tvr t |Sy)z :param feature: The module, codec, or feature to check for. :returns: The version number as a string, or ``None`` if unknown or not available. N)rr)r;rFr_rfrls r#rErEs@'g&&&W%%(w'' r*c~t}|jt|jt|S)zJ :returns: A list of all supported modules, features, and codecs. )r.extendrhrH)rets r# get_supportedrrs1 !CJJ%'(JJ#%& Jr*c j |tj}tjt d|t dt j |tjj}t d|dj||ddD] }t d|j|"t d|t d tjxsd |tjtjk7rt d tj|t d tj|t d|t d tjjtj |t dtjjtj"j |t d|dD]\}}t%|rd}|dk(r$t'd}|t)drdnd}|d|zz }| t|}||dv}|dk(r$t+d|j-dDdk}|rdnd} |dk(rt'd} | .|d| zz }n%|dk(r d D]} t'| } | |d!| d| z }t d"|d#| ||t d"|d$|t d%|d&|t d||rt/j0t2} tj4j7D]\}}| |j9|t;tj<D]a}|}|tj>vr|dtj>|}t |||| vr7t d'jAd!jCt;| ||g}|tjDvr|j9d(|tjFvr|j9d)|tjHvr|j9d*|tjJvr|j9d+|tjLvr|j9d,t d-jAd!jC||t d|dyy).a  Prints information about this installation of Pillow. This function can be called with ``python3 -m PIL``. It can also be called with ``python3 -m PIL.report`` or ``python3 -m PIL --report`` to have "supported_formats" set to ``False``, omitting the list of all supported image file formats. :param out: The output stream to print to. Defaults to ``sys.stdout`` if ``None``. :param supported_formats: If ``True``, a list of all supported image file formats will be printed. NzD--------------------------------------------------------------------)filezPillow zPython rrz zPython executable is unknownz%Environment Python files loaded from z System Python files loaded from z"Python Pillow modules loaded from z"Binary Pillow modules loaded from ) )rzPIL CORE)rTKINTER)r FREETYPE2)r LITTLECMS2)rWEBP)rAVIF)r7JPEG)r8zOPENJPEG (JPEG2000))r5zZLIB (PNG/ZIP))r6LIBTIFF)rWzRAQM (Bidirectional Text))r]z#LIBIMAGEQUANT (Quantization method))r^zXCB (X protocol)r7rZr[z libjpeg-turbo )rr7rc32K|]}t|yw)N)int).0xs r# zpilinfo..(s*Ha3q6*Hs.)rjz compiled forloadedr5r\z, compiled for zlib-ng rW)rXrYz, z---z support ok,z support okz***zsupport not installedzExtensions: {}opensavesave_alldecodeencodez Features: {})'sysstdoutrinitprintra __version__rE splitlinesstrip executableprefix base_prefixospathdirname__file__r=rmrfrdtuplerD collections defaultdictlist EXTENSIONitemsappendsortedIDMIMEformatjoinOPENSAVESAVE_ALLDECODERSENCODERS)outsupported_formatspy_version_lines py_versionnamervrPversion_statictrSr-v2 extensionsextiliner_s r#pilinfors% {jj JJL ( GCOO$ %C0{{--/ G$Q'--/0 1<&qr*8   ((*+,378 ( !#.."=I!> ?cJ zzS__$ 5cjj\BM ,S__,= >SI ( ,RWW__U^^-L,MN  ,RWW__UZZ=P=P-Q,RS  (+E g ; Au}(7(H%(4%29%= ?A444AyDM}!%!7<'%**H1773<*H%H6%QN&4N(6>&5i&@O&26HHV^4/,Q/>2aS".A/eWmQDeWl= %"9 DW+EX ( ,,T2 oo++- &FC qM  % &! &ASDEJJqA0 $S !J$++DIIfZ]6K,LMTWHEJJ'EJJ'ENN" +ENN")ENN") .'' ((;<3 G ( %1 & r*)rrreturnbool)rrrz str | None)rz list[str])rrrz bool | None)NT)rzIO[str] | NonerrrNone) __future__rrrrrtypingrrarrr$r)r.r;r@rFrHr___annotations__rdrfrhrmrErrrr*r#rs"   .48: 0 ,  0 <3 % %  1"*1 <DGSHAQ - 4 0 0<"5$  t&r*