Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.122
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
local /
lib /
python3.5 /
dist-packages /
PIL /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-sr-x
2025-04-10 17:07
BdfFontFile.py
2.75
KB
-rw-r--r--
2025-04-10 17:07
BlpImagePlugin.py
13.96
KB
-rw-r--r--
2025-04-10 17:07
BmpImagePlugin.py
14.04
KB
-rw-r--r--
2025-04-10 17:07
BufrStubImagePlugin.py
1.48
KB
-rw-r--r--
2025-04-10 17:07
ContainerIO.py
2.82
KB
-rw-r--r--
2025-04-10 17:07
CurImagePlugin.py
1.64
KB
-rw-r--r--
2025-04-10 17:07
DcxImagePlugin.py
2.09
KB
-rw-r--r--
2025-04-10 17:07
DdsImagePlugin.py
5.34
KB
-rw-r--r--
2025-04-10 17:07
EpsImagePlugin.py
11.84
KB
-rw-r--r--
2025-04-10 17:07
ExifTags.py
8.8
KB
-rw-r--r--
2025-04-10 17:07
FitsStubImagePlugin.py
1.59
KB
-rw-r--r--
2025-04-10 17:07
FliImagePlugin.py
4.17
KB
-rw-r--r--
2025-04-10 17:07
FontFile.py
2.7
KB
-rw-r--r--
2025-04-10 17:07
FpxImagePlugin.py
6.51
KB
-rw-r--r--
2025-04-10 17:07
FtexImagePlugin.py
3.23
KB
-rw-r--r--
2025-04-10 17:07
GbrImagePlugin.py
2.74
KB
-rw-r--r--
2025-04-10 17:07
GdImageFile.py
2.43
KB
-rw-r--r--
2025-04-10 17:07
GifImagePlugin.py
28.2
KB
-rw-r--r--
2025-04-10 17:07
GimpGradientFile.py
3.27
KB
-rw-r--r--
2025-04-10 17:07
GimpPaletteFile.py
1.24
KB
-rw-r--r--
2025-04-10 17:07
GribStubImagePlugin.py
1.51
KB
-rw-r--r--
2025-04-10 17:07
Hdf5StubImagePlugin.py
1.48
KB
-rw-r--r--
2025-04-10 17:07
IcnsImagePlugin.py
11.44
KB
-rw-r--r--
2025-04-10 17:07
IcoImagePlugin.py
9.9
KB
-rw-r--r--
2025-04-10 17:07
ImImagePlugin.py
10.57
KB
-rw-r--r--
2025-04-10 17:07
Image.py
112.93
KB
-rw-r--r--
2025-04-10 17:07
ImageChops.py
7.14
KB
-rw-r--r--
2025-04-10 17:07
ImageCms.py
35.89
KB
-rw-r--r--
2025-04-10 17:07
ImageColor.py
8.43
KB
-rw-r--r--
2025-04-10 17:07
ImageDraw.py
18.87
KB
-rw-r--r--
2025-04-10 17:07
ImageDraw2.py
4.9
KB
-rw-r--r--
2025-04-10 17:07
ImageEnhance.py
3.12
KB
-rw-r--r--
2025-04-10 17:07
ImageFile.py
20.52
KB
-rw-r--r--
2025-04-10 17:07
ImageFilter.py
15.51
KB
-rw-r--r--
2025-04-10 17:07
ImageFont.py
35.23
KB
-rw-r--r--
2025-04-10 17:07
ImageGrab.py
3.54
KB
-rw-r--r--
2025-04-10 17:07
ImageMath.py
6.89
KB
-rw-r--r--
2025-04-10 17:07
ImageMode.py
1.6
KB
-rw-r--r--
2025-04-10 17:07
ImageMorph.py
7.71
KB
-rw-r--r--
2025-04-10 17:07
ImageOps.py
17.6
KB
-rw-r--r--
2025-04-10 17:07
ImagePalette.py
6.2
KB
-rw-r--r--
2025-04-10 17:07
ImagePath.py
336
B
-rw-r--r--
2025-04-10 17:07
ImageQt.py
5.66
KB
-rw-r--r--
2025-04-10 17:07
ImageSequence.py
1.81
KB
-rw-r--r--
2025-04-10 17:07
ImageShow.py
6.21
KB
-rw-r--r--
2025-04-10 17:07
ImageStat.py
3.81
KB
-rw-r--r--
2025-04-10 17:07
ImageTk.py
9.11
KB
-rw-r--r--
2025-04-10 17:07
ImageTransform.py
2.78
KB
-rw-r--r--
2025-04-10 17:07
ImageWin.py
7.03
KB
-rw-r--r--
2025-04-10 17:07
ImtImagePlugin.py
2.15
KB
-rw-r--r--
2025-04-10 17:07
IptcImagePlugin.py
5.54
KB
-rw-r--r--
2025-04-10 17:07
Jpeg2KImagePlugin.py
8.52
KB
-rw-r--r--
2025-04-10 17:07
JpegImagePlugin.py
27.24
KB
-rw-r--r--
2025-04-10 17:07
JpegPresets.py
12.41
KB
-rw-r--r--
2025-04-10 17:07
McIdasImagePlugin.py
1.71
KB
-rw-r--r--
2025-04-10 17:07
MicImagePlugin.py
2.54
KB
-rw-r--r--
2025-04-10 17:07
MpegImagePlugin.py
1.76
KB
-rw-r--r--
2025-04-10 17:07
MpoImagePlugin.py
4.14
KB
-rw-r--r--
2025-04-10 17:07
MspImagePlugin.py
5.4
KB
-rw-r--r--
2025-04-10 17:07
PSDraw.py
6.58
KB
-rw-r--r--
2025-04-10 17:07
PaletteFile.py
1.08
KB
-rw-r--r--
2025-04-10 17:07
PalmImagePlugin.py
8.88
KB
-rw-r--r--
2025-04-10 17:07
PcdImagePlugin.py
1.47
KB
-rw-r--r--
2025-04-10 17:07
PcfFontFile.py
6.12
KB
-rw-r--r--
2025-04-10 17:07
PcxImagePlugin.py
5.35
KB
-rw-r--r--
2025-04-10 17:07
PdfImagePlugin.py
7.4
KB
-rw-r--r--
2025-04-10 17:07
PdfParser.py
33.62
KB
-rw-r--r--
2025-04-10 17:07
PixarImagePlugin.py
1.61
KB
-rw-r--r--
2025-04-10 17:07
PngImagePlugin.py
40.81
KB
-rw-r--r--
2025-04-10 17:07
PpmImagePlugin.py
4.35
KB
-rw-r--r--
2025-04-10 17:07
PsdImagePlugin.py
7.45
KB
-rw-r--r--
2025-04-10 17:07
PyAccess.py
9.37
KB
-rw-r--r--
2025-04-10 17:07
SgiImagePlugin.py
5.96
KB
-rw-r--r--
2025-04-10 17:07
SpiderImagePlugin.py
9.31
KB
-rw-r--r--
2025-04-10 17:07
SunImagePlugin.py
4.2
KB
-rw-r--r--
2025-04-10 17:07
TarIO.py
1.41
KB
-rw-r--r--
2025-04-10 17:07
TgaImagePlugin.py
6.12
KB
-rw-r--r--
2025-04-10 17:07
TiffImagePlugin.py
65.92
KB
-rw-r--r--
2025-04-10 17:07
TiffTags.py
14.21
KB
-rw-r--r--
2025-04-10 17:07
WalImageFile.py
5.4
KB
-rw-r--r--
2025-04-10 17:07
WebPImagePlugin.py
10.54
KB
-rw-r--r--
2025-04-10 17:07
WmfImagePlugin.py
4.5
KB
-rw-r--r--
2025-04-10 17:07
XVThumbImagePlugin.py
1.9
KB
-rw-r--r--
2025-04-10 17:07
XbmImagePlugin.py
2.39
KB
-rw-r--r--
2025-04-10 17:07
XpmImagePlugin.py
3
KB
-rw-r--r--
2025-04-10 17:07
__init__.py
3.19
KB
-rw-r--r--
2025-04-10 17:07
__main__.py
41
B
-rw-r--r--
2025-04-10 17:07
_binary.py
1.75
KB
-rw-r--r--
2025-04-10 17:07
_imaging.cpython-35m-x86_64-linux-gnu.so
637.91
KB
-rwxr-xr-x
2025-04-10 17:07
_imagingcms.cpython-35m-x86_64-linux-gnu.so
44.27
KB
-rwxr-xr-x
2025-04-10 17:07
_imagingft.cpython-35m-x86_64-linux-gnu.so
39.9
KB
-rwxr-xr-x
2025-04-10 17:07
_imagingmath.cpython-35m-x86_64-linux-gnu.so
24.43
KB
-rwxr-xr-x
2025-04-10 17:07
_imagingmorph.cpython-35m-x86_64-linux-gnu.so
8.12
KB
-rwxr-xr-x
2025-04-10 17:07
_imagingtk.cpython-35m-x86_64-linux-gnu.so
9.37
KB
-rwxr-xr-x
2025-04-10 17:07
_tkinter_finder.py
622
B
-rw-r--r--
2025-04-10 17:07
_util.py
503
B
-rw-r--r--
2025-04-10 17:07
_version.py
50
B
-rw-r--r--
2025-04-10 17:07
_webp.cpython-35m-x86_64-linux-gnu.so
38.5
KB
-rwxr-xr-x
2025-04-10 17:07
features.py
8.62
KB
-rw-r--r--
2025-04-10 17:07
Save
Rename
# # The Python Imaging Library. # $Id$ # # PDF (Acrobat) file handling # # History: # 1996-07-16 fl Created # 1997-01-18 fl Fixed header # 2004-02-21 fl Fixes for 1/L/CMYK images, etc. # 2004-02-24 fl Fixes for 1 and P images. # # Copyright (c) 1997-2004 by Secret Labs AB. All rights reserved. # Copyright (c) 1996-1997 by Fredrik Lundh. # # See the README file for information on usage and redistribution. # ## # Image plugin for PDF images (output only). ## import io import os import time from . import Image, ImageFile, ImageSequence, PdfParser, __version__ # # -------------------------------------------------------------------- # object ids: # 1. catalogue # 2. pages # 3. image # 4. page # 5. page contents def _save_all(im, fp, filename): _save(im, fp, filename, save_all=True) ## # (Internal) Image save plugin for the PDF format. def _save(im, fp, filename, save_all=False): is_appending = im.encoderinfo.get("append", False) if is_appending: existing_pdf = PdfParser.PdfParser(f=fp, filename=filename, mode="r+b") else: existing_pdf = PdfParser.PdfParser(f=fp, filename=filename, mode="w+b") resolution = im.encoderinfo.get("resolution", 72.0) info = { "title": None if is_appending else os.path.splitext(os.path.basename(filename))[0], "author": None, "subject": None, "keywords": None, "creator": None, "producer": None, "creationDate": None if is_appending else time.gmtime(), "modDate": None if is_appending else time.gmtime(), } for k, default in info.items(): v = im.encoderinfo.get(k) if k in im.encoderinfo else default if v: existing_pdf.info[k[0].upper() + k[1:]] = v # # make sure image data is available im.load() existing_pdf.start_writing() existing_pdf.write_header() existing_pdf.write_comment("created by Pillow {} PDF driver".format(__version__)) # # pages ims = [im] if save_all: append_images = im.encoderinfo.get("append_images", []) for append_im in append_images: append_im.encoderinfo = im.encoderinfo.copy() ims.append(append_im) numberOfPages = 0 image_refs = [] page_refs = [] contents_refs = [] for im in ims: im_numberOfPages = 1 if save_all: try: im_numberOfPages = im.n_frames except AttributeError: # Image format does not have n_frames. # It is a single frame image pass numberOfPages += im_numberOfPages for i in range(im_numberOfPages): image_refs.append(existing_pdf.next_object_id(0)) page_refs.append(existing_pdf.next_object_id(0)) contents_refs.append(existing_pdf.next_object_id(0)) existing_pdf.pages.append(page_refs[-1]) # # catalog and list of pages existing_pdf.write_catalog() pageNumber = 0 for imSequence in ims: im_pages = ImageSequence.Iterator(imSequence) if save_all else [imSequence] for im in im_pages: # FIXME: Should replace ASCIIHexDecode with RunLengthDecode # (packbits) or LZWDecode (tiff/lzw compression). Note that # PDF 1.2 also supports Flatedecode (zip compression). bits = 8 params = None if im.mode == "1": filter = "ASCIIHexDecode" colorspace = PdfParser.PdfName("DeviceGray") procset = "ImageB" # grayscale bits = 1 elif im.mode == "L": filter = "DCTDecode" # params = "<< /Predictor 15 /Columns %d >>" % (width-2) colorspace = PdfParser.PdfName("DeviceGray") procset = "ImageB" # grayscale elif im.mode == "P": filter = "ASCIIHexDecode" palette = im.im.getpalette("RGB") colorspace = [ PdfParser.PdfName("Indexed"), PdfParser.PdfName("DeviceRGB"), 255, PdfParser.PdfBinary(palette), ] procset = "ImageI" # indexed color elif im.mode == "RGB": filter = "DCTDecode" colorspace = PdfParser.PdfName("DeviceRGB") procset = "ImageC" # color images elif im.mode == "CMYK": filter = "DCTDecode" colorspace = PdfParser.PdfName("DeviceCMYK") procset = "ImageC" # color images else: raise ValueError("cannot save mode %s" % im.mode) # # image op = io.BytesIO() if filter == "ASCIIHexDecode": if bits == 1: # FIXME: the hex encoder doesn't support packed 1-bit # images; do things the hard way... data = im.tobytes("raw", "1") im = Image.new("L", im.size) im.putdata(data) ImageFile._save(im, op, [("hex", (0, 0) + im.size, 0, im.mode)]) elif filter == "DCTDecode": Image.SAVE["JPEG"](im, op, filename) elif filter == "FlateDecode": ImageFile._save(im, op, [("zip", (0, 0) + im.size, 0, im.mode)]) elif filter == "RunLengthDecode": ImageFile._save(im, op, [("packbits", (0, 0) + im.size, 0, im.mode)]) else: raise ValueError("unsupported PDF filter (%s)" % filter) # # Get image characteristics width, height = im.size existing_pdf.write_obj( image_refs[pageNumber], stream=op.getvalue(), Type=PdfParser.PdfName("XObject"), Subtype=PdfParser.PdfName("Image"), Width=width, # * 72.0 / resolution, Height=height, # * 72.0 / resolution, Filter=PdfParser.PdfName(filter), BitsPerComponent=bits, DecodeParams=params, ColorSpace=colorspace, ) # # page existing_pdf.write_page( page_refs[pageNumber], Resources=PdfParser.PdfDict( ProcSet=[PdfParser.PdfName("PDF"), PdfParser.PdfName(procset)], XObject=PdfParser.PdfDict(image=image_refs[pageNumber]), ), MediaBox=[ 0, 0, int(width * 72.0 / resolution), int(height * 72.0 / resolution), ], Contents=contents_refs[pageNumber], ) # # page contents page_contents = b"q %d 0 0 %d 0 0 cm /image Do Q\n" % ( int(width * 72.0 / resolution), int(height * 72.0 / resolution), ) existing_pdf.write_obj(contents_refs[pageNumber], stream=page_contents) pageNumber += 1 # # trailer existing_pdf.write_xref_and_trailer() if hasattr(fp, "flush"): fp.flush() existing_pdf.close() # # -------------------------------------------------------------------- Image.register_save("PDF", _save) Image.register_save_all("PDF", _save_all) Image.register_extension("PDF", ".pdf") Image.register_mime("PDF", "application/pdf")