
    	h                         S SK Jr  S SKJr  S SKJr  S SKJr  S SKJ	r	J
r
Jr  S SKJr  S SKJrJr  S SKJr  S S	KJr  S
 rg)    )BytesIO)warn)
fromstring)IMAGE_NS)get_relget_rels_pathget_dependents)SpreadsheetDrawing)ImagePILImage)
ChartSpace)
read_chartc           
      p   U R                  U5      n[        U5      n [        R                  " U5      n[        U5      n/ nXPR                  5       ;   a  [        X5      n/ nUR                   HL  n [        XUR                  [        5      n	[        U	5      nUR                  Ul        UR                  U5        MN     / n[         (       d  X|4$ UR"                   H  nUR%                  UR&                  5      nUR(                  [*        :X  d  M4   [-        [/        U R                  UR0                  5      5      5      nUR4                  R7                  5       S:X  a(  SR5                  UR4                  5      n[        U5        M  UR                  Ul        UR                  U5        M     X|4$ ! [         a    [        S5        / / 4s $ f = f! [         a*  n
[        SUR                   SU SU
 35         Sn
A
GM  Sn
A
ff = f! [2         a+    SR5                  UR0                  5      n[        U5         GM[  f = f)	zq
Given the path to a drawing file extract charts and images

Ignore errors due to unsupported parts of DrawingML
zhDrawingML support is incomplete and limited to charts and images only. Shapes and drawings will be lost.zUnable to read chart z from  Nz7The image {0} will be removed because it cannot be readWMFz?{0} image format is not supported so the image is being dropped)readr   r
   	from_tree	TypeErrorr   r   namelistr	   _chart_relsr   idr   r   anchorappendr   
_blip_relsgetembedTyper   r   r   targetOSErrorformatupper)archivepathsrctreedrawing	rels_pathdepschartsrelcsechartimagesdepimagemsgs                   J/var/www/html/env/lib/python3.13/site-packages/openpyxl/reader/drawings.pyfind_imagesr3      s    ,,t
Cc?D$..t4
 d#ID$$&&g1F""	
;B 2zze # F8~!!hhsyy!88xggll3::&>?@
 ||!!#u,W^^_d_k_klS	::ELMM%  " >O  wx2v  	(tfAaSAB	   OVVWZWaWabS	s;   F* 1G	-H *GG	
G=G88G= 0H54H5N)ior   warningsr   openpyxl.xml.functionsr   openpyxl.xml.constantsr   openpyxl.packaging.relationshipr   r   r	   $openpyxl.drawing.spreadsheet_drawingr
   openpyxl.drawing.imager   r   openpyxl.chart.chartspacer   openpyxl.chart.readerr   r3        r2   <module>r?      s1   
   - + 
 D 2 0 ,2r>   