GRAYBYTE WORDPRESS FILE MANAGER9860

Server IP : 149.255.58.128 / Your IP : 216.73.216.88
System : Linux cloud516.thundercloud.uk 5.14.0-427.26.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 17 15:51:13 EDT 2024 x86_64
PHP Version : 8.2.28
Disable Function : allow_url_include, apache_child_terminate, apache_setenv, exec, passthru, pcntl_exec, posix_kill, posix_mkfifo, posix_getpwuid, posix_setpgid, posix_setsid, posix_setuid, posix_setgid, posix_seteuid, posix_setegid, posix_uname, proc_close, proc_get_status, proc_open, proc_terminate, shell_exec, show_source, system
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /usr/lib64/python3.9/email/mime/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /usr/lib64/python3.9/email/mime//image.py
# Copyright (C) 2001-2006 Python Software Foundation
# Author: Barry Warsaw
# Contact: email-sig@python.org

"""Class representing image/* type MIME documents."""

__all__ = ['MIMEImage']

import imghdr

from email import encoders
from email.mime.nonmultipart import MIMENonMultipart



class MIMEImage(MIMENonMultipart):
    """Class for generating image/* type MIME documents."""

    def __init__(self, _imagedata, _subtype=None,
                 _encoder=encoders.encode_base64, *, policy=None, **_params):
        """Create an image/* type MIME document.

        _imagedata is a string containing the raw image data.  If this data
        can be decoded by the standard Python `imghdr' module, then the
        subtype will be automatically included in the Content-Type header.
        Otherwise, you can specify the specific image subtype via the _subtype
        parameter.

        _encoder is a function which will perform the actual encoding for
        transport of the image data.  It takes one argument, which is this
        Image instance.  It should use get_payload() and set_payload() to
        change the payload to the encoded form.  It should also add any
        Content-Transfer-Encoding or other headers to the message as
        necessary.  The default encoding is Base64.

        Any additional keyword arguments are passed to the base class
        constructor, which turns them into parameters on the Content-Type
        header.
        """
        if _subtype is None:
            _subtype = imghdr.what(None, _imagedata)
        if _subtype is None:
            raise TypeError('Could not guess image MIME subtype')
        MIMENonMultipart.__init__(self, 'image', _subtype, policy=policy,
                                  **_params)
        self.set_payload(_imagedata)
        _encoder(self)

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
December 12 2024 22:42:25
0 / root
0755
__pycache__
--
December 12 2024 22:42:25
0 / root
0755
__init__.py
0 KB
December 12 2024 10:11:37
0 / root
0644
application.py
1.29 KB
December 03 2024 17:50:13
0 / root
0644
audio.py
2.675 KB
December 03 2024 17:50:13
0 / root
0644
base.py
0.895 KB
December 03 2024 17:50:13
0 / root
0644
image.py
1.786 KB
December 03 2024 17:50:13
0 / root
0644
message.py
1.286 KB
December 03 2024 17:50:13
0 / root
0644
multipart.py
1.583 KB
December 03 2024 17:50:13
0 / root
0644
nonmultipart.py
0.675 KB
December 03 2024 17:50:13
0 / root
0644
text.py
1.403 KB
December 03 2024 17:50:13
0 / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF