rebuild for 10.11+
This commit is contained in:
parent
d989eff547
commit
901b731582
234 changed files with 1522 additions and 927 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/python3.7/site-packages/Crypto/PublicKey/_fastmath.cpython-37m-darwin.so
Executable file
BIN
lib/python3.7/site-packages/Crypto/PublicKey/_fastmath.cpython-37m-darwin.so
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -50,16 +50,17 @@ def _accept(prefix):
|
|||
return prefix[:2] == b"BM"
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# =============================================================================
|
||||
# Image plugin for the Windows BMP format.
|
||||
# ==============================================================================
|
||||
# =============================================================================
|
||||
class BmpImageFile(ImageFile.ImageFile):
|
||||
""" Image plugin for the Windows Bitmap format (BMP) """
|
||||
|
||||
# -------------------------------------------------------------- Description
|
||||
# ------------------------------------------------------------- Description
|
||||
format_description = "Windows Bitmap"
|
||||
format = "BMP"
|
||||
# --------------------------------------------------- BMP Compression values
|
||||
|
||||
# -------------------------------------------------- BMP Compression values
|
||||
COMPRESSIONS = {
|
||||
'RAW': 0,
|
||||
'RLE8': 1,
|
||||
|
|
@ -79,12 +80,14 @@ class BmpImageFile(ImageFile.ImageFile):
|
|||
# read bmp header size @offset 14 (this is part of the header size)
|
||||
file_info['header_size'] = i32(read(4))
|
||||
file_info['direction'] = -1
|
||||
# --------------------- If requested, read header at a specific position
|
||||
|
||||
# -------------------- If requested, read header at a specific position
|
||||
# read the rest of the bmp header, without its size
|
||||
header_data = ImageFile._safe_read(self.fp,
|
||||
file_info['header_size'] - 4)
|
||||
# --------------------------------------------------- IBM OS/2 Bitmap v1
|
||||
# ------ This format has different offsets because of width/height types
|
||||
|
||||
# -------------------------------------------------- IBM OS/2 Bitmap v1
|
||||
# ----- This format has different offsets because of width/height types
|
||||
if file_info['header_size'] == 12:
|
||||
file_info['width'] = i16(header_data[0:2])
|
||||
file_info['height'] = i16(header_data[2:4])
|
||||
|
|
@ -92,8 +95,10 @@ class BmpImageFile(ImageFile.ImageFile):
|
|||
file_info['bits'] = i16(header_data[6:8])
|
||||
file_info['compression'] = self.RAW
|
||||
file_info['palette_padding'] = 3
|
||||
# ---------------------------------------------- Windows Bitmap v2 to v5
|
||||
elif file_info['header_size'] in (40, 64, 108, 124): # v3, OS/2 v2, v4, v5
|
||||
|
||||
# --------------------------------------------- Windows Bitmap v2 to v5
|
||||
# v3, OS/2 v2, v4, v5
|
||||
elif file_info['header_size'] in (40, 64, 108, 124):
|
||||
if file_info['header_size'] >= 40: # v3 and OS/2
|
||||
file_info['y_flip'] = i8(header_data[7]) == 0xff
|
||||
file_info['direction'] = 1 if file_info['y_flip'] else -1
|
||||
|
|
@ -119,12 +124,15 @@ class BmpImageFile(ImageFile.ImageFile):
|
|||
'g_mask',
|
||||
'b_mask',
|
||||
'a_mask']):
|
||||
file_info[mask] = i32(header_data[36+idx*4:40+idx*4])
|
||||
file_info[mask] = i32(
|
||||
header_data[36 + idx * 4:40 + idx * 4]
|
||||
)
|
||||
else:
|
||||
# 40 byte headers only have the three components in the
|
||||
# bitfields masks,
|
||||
# ref: https://msdn.microsoft.com/en-us/library/windows/desktop/dd183376(v=vs.85).aspx
|
||||
# See also https://github.com/python-pillow/Pillow/issues/1293
|
||||
# bitfields masks, ref:
|
||||
# https://msdn.microsoft.com/en-us/library/windows/desktop/dd183376(v=vs.85).aspx
|
||||
# See also
|
||||
# https://github.com/python-pillow/Pillow/issues/1293
|
||||
# There is a 4th component in the RGBQuad, in the alpha
|
||||
# location, but it is listed as a reserved component,
|
||||
# and it is not generally an alpha channel
|
||||
|
|
@ -141,20 +149,27 @@ class BmpImageFile(ImageFile.ImageFile):
|
|||
else:
|
||||
raise IOError("Unsupported BMP header type (%d)" %
|
||||
file_info['header_size'])
|
||||
|
||||
# ------------------ Special case : header is reported 40, which
|
||||
# ---------------------- is shorter than real size for bpp >= 16
|
||||
self._size = file_info['width'], file_info['height']
|
||||
# -------- If color count was not found in the header, compute from bits
|
||||
file_info['colors'] = file_info['colors'] if file_info.get('colors', 0) else (1 << file_info['bits'])
|
||||
# -------------------------------- Check abnormal values for DOS attacks
|
||||
|
||||
# ------- If color count was not found in the header, compute from bits
|
||||
file_info["colors"] = (file_info["colors"]
|
||||
if file_info.get("colors", 0)
|
||||
else (1 << file_info["bits"]))
|
||||
|
||||
# ------------------------------- Check abnormal values for DOS attacks
|
||||
if file_info['width'] * file_info['height'] > 2**31:
|
||||
raise IOError("Unsupported BMP Size: (%dx%d)" % self.size)
|
||||
# ----------------------- Check bit depth for unusual unsupported values
|
||||
|
||||
# ---------------------- Check bit depth for unusual unsupported values
|
||||
self.mode, raw_mode = BIT2MODE.get(file_info['bits'], (None, None))
|
||||
if self.mode is None:
|
||||
raise IOError("Unsupported BMP pixel depth (%d)"
|
||||
% file_info['bits'])
|
||||
# ----------------- Process BMP with Bitfields compression (not palette)
|
||||
|
||||
# ---------------- Process BMP with Bitfields compression (not palette)
|
||||
if file_info['compression'] == self.BITFIELDS:
|
||||
SUPPORTED = {
|
||||
32: [(0xff0000, 0xff00, 0xff, 0x0),
|
||||
|
|
@ -176,7 +191,9 @@ class BmpImageFile(ImageFile.ImageFile):
|
|||
if file_info['bits'] in SUPPORTED:
|
||||
if file_info['bits'] == 32 and \
|
||||
file_info['rgba_mask'] in SUPPORTED[file_info['bits']]:
|
||||
raw_mode = MASK_MODES[(file_info['bits'], file_info['rgba_mask'])]
|
||||
raw_mode = MASK_MODES[
|
||||
(file_info["bits"], file_info["rgba_mask"])
|
||||
]
|
||||
self.mode = "RGBA" if raw_mode in ("BGRA",) else self.mode
|
||||
elif (file_info['bits'] in (24, 16) and
|
||||
file_info['rgb_mask'] in SUPPORTED[file_info['bits']]):
|
||||
|
|
@ -193,9 +210,11 @@ class BmpImageFile(ImageFile.ImageFile):
|
|||
else:
|
||||
raise IOError("Unsupported BMP compression (%d)" %
|
||||
file_info['compression'])
|
||||
# ---------------- Once the header is processed, process the palette/LUT
|
||||
|
||||
# --------------- Once the header is processed, process the palette/LUT
|
||||
if self.mode == "P": # Paletted for 1, 4 and 8 bit images
|
||||
# ----------------------------------------------------- 1-bit images
|
||||
|
||||
# ---------------------------------------------------- 1-bit images
|
||||
if not (0 < file_info['colors'] <= 65536):
|
||||
raise IOError("Unsupported BMP Palette size (%d)" %
|
||||
file_info['colors'])
|
||||
|
|
@ -205,12 +224,14 @@ class BmpImageFile(ImageFile.ImageFile):
|
|||
greyscale = True
|
||||
indices = (0, 255) if file_info['colors'] == 2 else \
|
||||
list(range(file_info['colors']))
|
||||
# ------------------ Check if greyscale and ignore palette if so
|
||||
|
||||
# ----------------- Check if greyscale and ignore palette if so
|
||||
for ind, val in enumerate(indices):
|
||||
rgb = palette[ind*padding:ind*padding + 3]
|
||||
if rgb != o8(val) * 3:
|
||||
greyscale = False
|
||||
# -------- If all colors are grey, white or black, ditch palette
|
||||
|
||||
# ------- If all colors are grey, white or black, ditch palette
|
||||
if greyscale:
|
||||
self.mode = "1" if file_info['colors'] == 2 else "L"
|
||||
raw_mode = self.mode
|
||||
|
|
@ -219,7 +240,7 @@ class BmpImageFile(ImageFile.ImageFile):
|
|||
self.palette = ImagePalette.raw(
|
||||
"BGRX" if padding == 4 else "BGR", palette)
|
||||
|
||||
# ----------------------------- Finally set the tile data for the plugin
|
||||
# ---------------------------- Finally set the tile data for the plugin
|
||||
self.info['compression'] = file_info['compression']
|
||||
self.tile = [
|
||||
('raw',
|
||||
|
|
@ -243,9 +264,9 @@ class BmpImageFile(ImageFile.ImageFile):
|
|||
self._bitmap(offset=offset)
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# =============================================================================
|
||||
# Image plugin for the DIB format (BMP alias)
|
||||
# ==============================================================================
|
||||
# =============================================================================
|
||||
class DibImageFile(BmpImageFile):
|
||||
|
||||
format = "DIB"
|
||||
|
|
|
|||
|
|
@ -81,6 +81,15 @@ class DcxImageFile(PcxImageFile):
|
|||
def tell(self):
|
||||
return self.frame
|
||||
|
||||
def _close__fp(self):
|
||||
try:
|
||||
if self.__fp != self.fp:
|
||||
self.__fp.close()
|
||||
except AttributeError:
|
||||
pass
|
||||
finally:
|
||||
self.__fp = None
|
||||
|
||||
|
||||
Image.register_open(DcxImageFile.format, DcxImageFile, _accept)
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ class DdsImageFile(ImageFile.ImageFile):
|
|||
self.mode = "RGBA"
|
||||
|
||||
pitch, depth, mipmaps = struct.unpack("<3I", header.read(12))
|
||||
reserved = struct.unpack("<11I", header.read(44))
|
||||
struct.unpack("<11I", header.read(44)) # reserved
|
||||
|
||||
# pixel format
|
||||
pfsize, pfflags = struct.unpack("<2I", header.read(8))
|
||||
|
|
|
|||
|
|
@ -125,10 +125,11 @@ def Ghostscript(tile, size, fp, scale=1):
|
|||
"-dSAFER", # safe mode
|
||||
"-sDEVICE=ppmraw", # ppm driver
|
||||
"-sOutputFile=%s" % outfile, # output file
|
||||
# adjust for image origin
|
||||
"-c", "%d %d translate" % (-bbox[0], -bbox[1]),
|
||||
# adjust for image origin
|
||||
"-f", infile, # input file
|
||||
"-c", "showpage", # showpage (see: https://bugs.ghostscript.com/show_bug.cgi?id=698272)
|
||||
# showpage (see https://bugs.ghostscript.com/show_bug.cgi?id=698272)
|
||||
"-c", "showpage",
|
||||
]
|
||||
|
||||
if gs_windows_binary is not None:
|
||||
|
|
|
|||
|
|
@ -131,6 +131,9 @@ class FliImageFile(ImageFile.ImageFile):
|
|||
self.__frame = -1
|
||||
self.__fp.seek(self.__rewind)
|
||||
self.__offset = 128
|
||||
else:
|
||||
# ensure that the previous frame was loaded
|
||||
self.load()
|
||||
|
||||
if frame != self.__frame + 1:
|
||||
raise ValueError("cannot seek to frame %d" % frame)
|
||||
|
|
@ -154,6 +157,15 @@ class FliImageFile(ImageFile.ImageFile):
|
|||
def tell(self):
|
||||
return self.__frame
|
||||
|
||||
def _close__fp(self):
|
||||
try:
|
||||
if self.__fp != self.fp:
|
||||
self.__fp.close()
|
||||
except AttributeError:
|
||||
pass
|
||||
finally:
|
||||
self.__fp = None
|
||||
|
||||
|
||||
#
|
||||
# registry
|
||||
|
|
|
|||
|
|
@ -20,7 +20,14 @@ has the following structure:
|
|||
{format_directory}
|
||||
{data}
|
||||
Where:
|
||||
{header} = { u32:magic, u32:version, u32:width, u32:height, u32:mipmap_count, u32:format_count }
|
||||
{header} = {
|
||||
u32:magic,
|
||||
u32:version,
|
||||
u32:width,
|
||||
u32:height,
|
||||
u32:mipmap_count,
|
||||
u32:format_count
|
||||
}
|
||||
|
||||
* The "magic" number is "FTEX".
|
||||
* "width" and "height" are the dimensions of the texture.
|
||||
|
|
@ -59,8 +66,8 @@ class FtexImageFile(ImageFile.ImageFile):
|
|||
format_description = "Texture File Format (IW2:EOC)"
|
||||
|
||||
def _open(self):
|
||||
magic = struct.unpack("<I", self.fp.read(4))
|
||||
version = struct.unpack("<i", self.fp.read(4))
|
||||
struct.unpack("<I", self.fp.read(4)) # magic
|
||||
struct.unpack("<i", self.fp.read(4)) # version
|
||||
self._size = struct.unpack("<2i", self.fp.read(8))
|
||||
mipmap_count, format_count = struct.unpack("<2i", self.fp.read(8))
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,8 @@ class GdImageFile(ImageFile.ImageFile):
|
|||
if tindex < 256:
|
||||
self.info["transparency"] = tindex
|
||||
|
||||
self.palette = ImagePalette.raw("XBGR", s[7+trueColorOffset+4:7+trueColorOffset+4+256*4])
|
||||
self.palette = ImagePalette.raw(
|
||||
"XBGR", s[7+trueColorOffset+4:7+trueColorOffset+4+256*4])
|
||||
|
||||
self.tile = [("raw", (0, 0)+self.size, 7+trueColorOffset+4+256*4,
|
||||
("L", 0, 1))]
|
||||
|
|
|
|||
|
|
@ -201,7 +201,13 @@ class GifImageFile(ImageFile.ImageFile):
|
|||
#
|
||||
# comment extension
|
||||
#
|
||||
info["comment"] = block
|
||||
while block:
|
||||
if "comment" in info:
|
||||
info["comment"] += block
|
||||
else:
|
||||
info["comment"] = block
|
||||
block = self.data()
|
||||
continue
|
||||
elif i8(s) == 255:
|
||||
#
|
||||
# application extension
|
||||
|
|
@ -296,6 +302,15 @@ class GifImageFile(ImageFile.ImageFile):
|
|||
self.im = self._prev_im
|
||||
self._prev_im = self.im.copy()
|
||||
|
||||
def _close__fp(self):
|
||||
try:
|
||||
if self.__fp != self.fp:
|
||||
self.__fp.close()
|
||||
except AttributeError:
|
||||
pass
|
||||
finally:
|
||||
self.__fp = None
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Write GIF files
|
||||
|
||||
|
|
@ -379,6 +394,8 @@ def _normalize_palette(im, palette, info):
|
|||
|
||||
def _write_single_frame(im, fp, palette):
|
||||
im_out = _normalize_mode(im, True)
|
||||
for k, v in im_out.info.items():
|
||||
im.encoderinfo.setdefault(k, v)
|
||||
im_out = _normalize_palette(im_out, palette, im.encoderinfo)
|
||||
|
||||
for s in _get_global_header(im_out, im.encoderinfo):
|
||||
|
|
@ -399,8 +416,8 @@ def _write_single_frame(im, fp, palette):
|
|||
|
||||
def _write_multiple_frames(im, fp, palette):
|
||||
|
||||
duration = im.encoderinfo.get("duration", None)
|
||||
disposal = im.encoderinfo.get('disposal', None)
|
||||
duration = im.encoderinfo.get("duration", im.info.get("duration"))
|
||||
disposal = im.encoderinfo.get("disposal", im.info.get("disposal"))
|
||||
|
||||
im_frames = []
|
||||
frame_count = 0
|
||||
|
|
@ -409,6 +426,9 @@ def _write_multiple_frames(im, fp, palette):
|
|||
for im_frame in ImageSequence.Iterator(imSequence):
|
||||
# a copy is required here since seek can still mutate the image
|
||||
im_frame = _normalize_mode(im_frame.copy())
|
||||
if frame_count == 0:
|
||||
for k, v in im_frame.info.items():
|
||||
im.encoderinfo.setdefault(k, v)
|
||||
im_frame = _normalize_palette(im_frame, palette, im.encoderinfo)
|
||||
|
||||
encoderinfo = im.encoderinfo.copy()
|
||||
|
|
@ -467,12 +487,10 @@ def _save_all(im, fp, filename):
|
|||
|
||||
|
||||
def _save(im, fp, filename, save_all=False):
|
||||
for k, v in im.info.items():
|
||||
im.encoderinfo.setdefault(k, v)
|
||||
# header
|
||||
try:
|
||||
palette = im.encoderinfo["palette"]
|
||||
except KeyError:
|
||||
if "palette" in im.encoderinfo or "palette" in im.info:
|
||||
palette = im.encoderinfo.get("palette", im.info.get("palette"))
|
||||
else:
|
||||
palette = None
|
||||
im.encoderinfo["optimize"] = im.encoderinfo.get("optimize", True)
|
||||
|
||||
|
|
@ -536,12 +554,14 @@ def _write_local_header(fp, im, offset, flags):
|
|||
o8(0))
|
||||
|
||||
if "comment" in im.encoderinfo and \
|
||||
1 <= len(im.encoderinfo["comment"]) <= 255:
|
||||
1 <= len(im.encoderinfo["comment"]):
|
||||
fp.write(b"!" +
|
||||
o8(254) + # extension intro
|
||||
o8(len(im.encoderinfo["comment"])) +
|
||||
im.encoderinfo["comment"] +
|
||||
o8(0))
|
||||
o8(254)) # extension intro
|
||||
for i in range(0, len(im.encoderinfo["comment"]), 255):
|
||||
subblock = im.encoderinfo["comment"][i:i+255]
|
||||
fp.write(o8(len(subblock)) +
|
||||
subblock)
|
||||
fp.write(o8(0))
|
||||
if "loop" in im.encoderinfo:
|
||||
number_of_loops = im.encoderinfo["loop"]
|
||||
fp.write(b"!" +
|
||||
|
|
@ -711,11 +731,18 @@ def _get_global_header(im, info):
|
|||
if im.info.get("version") == b"89a":
|
||||
version = b"89a"
|
||||
|
||||
background = 0
|
||||
if "background" in info:
|
||||
background = info["background"]
|
||||
if isinstance(background, tuple):
|
||||
# WebPImagePlugin stores an RGBA value in info["background"]
|
||||
# So it must be converted to the same format as GifImagePlugin's
|
||||
# info["background"] - a global color table index
|
||||
background = im.palette.getcolor(background)
|
||||
|
||||
palette_bytes = _get_palette_bytes(im)
|
||||
color_table_size = _get_color_table_size(palette_bytes)
|
||||
|
||||
background = info["background"] if "background" in info else 0
|
||||
|
||||
return [
|
||||
b"GIF"+version + # signature + version
|
||||
o16(im.size[0]) + # canvas width
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ class IcnsImageFile(ImageFile.ImageFile):
|
|||
if info_size not in self.info['sizes'] and len(info_size) == 3 and \
|
||||
info_size[2] == 1:
|
||||
simple_sizes = [(size[0] * size[2], size[1] * size[2])
|
||||
for size in self.info['sizes']]
|
||||
for size in self.info['sizes']]
|
||||
if value in simple_sizes:
|
||||
info_size = self.info['sizes'][simple_sizes.index(value)]
|
||||
if info_size not in self.info['sizes']:
|
||||
|
|
@ -311,6 +311,8 @@ class IcnsImageFile(ImageFile.ImageFile):
|
|||
self.im = im.im
|
||||
self.mode = im.mode
|
||||
self.size = im.size
|
||||
if self._exclusive_fp:
|
||||
self.fp.close()
|
||||
self.fp = None
|
||||
self.icns = None
|
||||
self.tile = ()
|
||||
|
|
@ -333,6 +335,7 @@ def _save(im, fp, filename):
|
|||
provided_images = {im.width: im
|
||||
for im in im.encoderinfo.get("append_images", [])}
|
||||
last_w = None
|
||||
second_path = None
|
||||
for w in [16, 32, 128, 256, 512]:
|
||||
prefix = 'icon_{}x{}'.format(w, w)
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ class ImImageFile(ImageFile.ImageFile):
|
|||
|
||||
try:
|
||||
m = split.match(s)
|
||||
except re.error as v:
|
||||
except re.error:
|
||||
raise SyntaxError("not an IM file")
|
||||
|
||||
if m:
|
||||
|
|
@ -290,6 +290,15 @@ class ImImageFile(ImageFile.ImageFile):
|
|||
def tell(self):
|
||||
return self.frame
|
||||
|
||||
def _close__fp(self):
|
||||
try:
|
||||
if self.__fp != self.fp:
|
||||
self.__fp.close()
|
||||
except AttributeError:
|
||||
pass
|
||||
finally:
|
||||
self.__fp = None
|
||||
|
||||
#
|
||||
# --------------------------------------------------------------------
|
||||
# Save IM files
|
||||
|
|
|
|||
|
|
@ -34,6 +34,36 @@ import logging
|
|||
import warnings
|
||||
import math
|
||||
|
||||
try:
|
||||
import builtins
|
||||
except ImportError:
|
||||
import __builtin__
|
||||
builtins = __builtin__
|
||||
|
||||
from . import ImageMode
|
||||
from ._binary import i8
|
||||
from ._util import isPath, isStringType, deferred_error
|
||||
|
||||
import os
|
||||
import sys
|
||||
import io
|
||||
import struct
|
||||
import atexit
|
||||
|
||||
# type stuff
|
||||
import numbers
|
||||
try:
|
||||
# Python 3
|
||||
from collections.abc import Callable
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
from collections import Callable
|
||||
|
||||
|
||||
# Silence warnings
|
||||
assert VERSION
|
||||
assert PILLOW_VERSION
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
@ -104,39 +134,13 @@ except ImportError as v:
|
|||
# see docs/porting.rst
|
||||
raise
|
||||
|
||||
try:
|
||||
import builtins
|
||||
except ImportError:
|
||||
import __builtin__
|
||||
builtins = __builtin__
|
||||
|
||||
from . import ImageMode
|
||||
from ._binary import i8
|
||||
from ._util import isPath, isStringType, deferred_error
|
||||
|
||||
import os
|
||||
import sys
|
||||
import io
|
||||
import struct
|
||||
import atexit
|
||||
|
||||
# type stuff
|
||||
import numbers
|
||||
try:
|
||||
# Python 3
|
||||
from collections.abc import Callable
|
||||
except ImportError:
|
||||
# Python 2.7
|
||||
from collections import Callable
|
||||
|
||||
|
||||
# works everywhere, win for pypy, not cpython
|
||||
USE_CFFI_ACCESS = hasattr(sys, 'pypy_version_info')
|
||||
try:
|
||||
import cffi
|
||||
HAS_CFFI = True
|
||||
except ImportError:
|
||||
HAS_CFFI = False
|
||||
cffi = None
|
||||
|
||||
try:
|
||||
from pathlib import Path
|
||||
|
|
@ -164,7 +168,7 @@ def isImageType(t):
|
|||
|
||||
|
||||
#
|
||||
# Constants (also defined in _imagingmodule.c!)
|
||||
# Constants
|
||||
|
||||
NONE = 0
|
||||
|
||||
|
|
@ -177,14 +181,14 @@ ROTATE_270 = 4
|
|||
TRANSPOSE = 5
|
||||
TRANSVERSE = 6
|
||||
|
||||
# transforms
|
||||
# transforms (also defined in Imaging.h)
|
||||
AFFINE = 0
|
||||
EXTENT = 1
|
||||
PERSPECTIVE = 2
|
||||
QUAD = 3
|
||||
MESH = 4
|
||||
|
||||
# resampling filters
|
||||
# resampling filters (also defined in Imaging.h)
|
||||
NEAREST = NONE = 0
|
||||
BOX = 4
|
||||
BILINEAR = LINEAR = 2
|
||||
|
|
@ -376,26 +380,32 @@ def preinit():
|
|||
|
||||
try:
|
||||
from . import BmpImagePlugin
|
||||
assert BmpImagePlugin
|
||||
except ImportError:
|
||||
pass
|
||||
try:
|
||||
from . import GifImagePlugin
|
||||
assert GifImagePlugin
|
||||
except ImportError:
|
||||
pass
|
||||
try:
|
||||
from . import JpegImagePlugin
|
||||
assert JpegImagePlugin
|
||||
except ImportError:
|
||||
pass
|
||||
try:
|
||||
from . import PpmImagePlugin
|
||||
assert PpmImagePlugin
|
||||
except ImportError:
|
||||
pass
|
||||
try:
|
||||
from . import PngImagePlugin
|
||||
assert PngImagePlugin
|
||||
except ImportError:
|
||||
pass
|
||||
# try:
|
||||
# import TiffImagePlugin
|
||||
# assert TiffImagePlugin
|
||||
# except ImportError:
|
||||
# pass
|
||||
|
||||
|
|
@ -564,7 +574,7 @@ class Image(object):
|
|||
new.info = self.info.copy()
|
||||
return new
|
||||
|
||||
# Context Manager Support
|
||||
# Context manager support
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
|
|
@ -584,6 +594,8 @@ class Image(object):
|
|||
:ref:`file-handling` for more information.
|
||||
"""
|
||||
try:
|
||||
if hasattr(self, "_close__fp"):
|
||||
self._close__fp()
|
||||
self.fp.close()
|
||||
self.fp = None
|
||||
except Exception as msg:
|
||||
|
|
@ -599,6 +611,8 @@ class Image(object):
|
|||
|
||||
if sys.version_info.major >= 3:
|
||||
def __del__(self):
|
||||
if hasattr(self, "_close__fp"):
|
||||
self._close__fp()
|
||||
if (hasattr(self, 'fp') and hasattr(self, '_exclusive_fp')
|
||||
and self.fp and self._exclusive_fp):
|
||||
self.fp.close()
|
||||
|
|
@ -813,8 +827,10 @@ class Image(object):
|
|||
Image class automatically loads an opened image when it is
|
||||
accessed for the first time.
|
||||
|
||||
This method will close the file associated with the image. See
|
||||
:ref:`file-handling` for more information.
|
||||
If the file associated with the image was opened by Pillow, then this
|
||||
method will close it. The exception to this is if the image has
|
||||
multiple frames, in which case the file will be left open for seek
|
||||
operations. See :ref:`file-handling` for more information.
|
||||
|
||||
:returns: An image access object.
|
||||
:rtype: :ref:`PixelAccess` or :py:class:`PIL.PyAccess`
|
||||
|
|
@ -833,7 +849,7 @@ class Image(object):
|
|||
self.palette.mode = "RGBA"
|
||||
|
||||
if self.im:
|
||||
if HAS_CFFI and USE_CFFI_ACCESS:
|
||||
if cffi and USE_CFFI_ACCESS:
|
||||
if self.pyaccess:
|
||||
return self.pyaccess
|
||||
from . import PyAccess
|
||||
|
|
@ -865,7 +881,7 @@ class Image(object):
|
|||
"L", "RGB" and "CMYK." The **matrix** argument only supports "L"
|
||||
and "RGB".
|
||||
|
||||
When translating a color image to black and white (mode "L"),
|
||||
When translating a color image to greyscale (mode "L"),
|
||||
the library uses the ITU-R 601-2 luma transform::
|
||||
|
||||
L = R * 299/1000 + G * 587/1000 + B * 114/1000
|
||||
|
|
@ -873,9 +889,9 @@ class Image(object):
|
|||
The default method of converting a greyscale ("L") or "RGB"
|
||||
image into a bilevel (mode "1") image uses Floyd-Steinberg
|
||||
dither to approximate the original image luminosity levels. If
|
||||
dither is NONE, all non-zero values are set to 255 (white). To
|
||||
use other thresholds, use the :py:meth:`~PIL.Image.Image.point`
|
||||
method.
|
||||
dither is NONE, all values larger than 128 are set to 255 (white),
|
||||
all other values to 0 (black). To use other thresholds, use the
|
||||
:py:meth:`~PIL.Image.Image.point` method.
|
||||
|
||||
When converting from "RGBA" to "P" without a **matrix** argument,
|
||||
this passes the operation to :py:meth:`~PIL.Image.Image.quantize`,
|
||||
|
|
@ -961,7 +977,7 @@ class Image(object):
|
|||
if isinstance(t, tuple):
|
||||
try:
|
||||
t = trns_im.palette.getcolor(t)
|
||||
except:
|
||||
except Exception:
|
||||
raise ValueError("Couldn't allocate a palette "
|
||||
"color for transparency")
|
||||
trns_im.putpixel((0, 0), t)
|
||||
|
|
@ -998,7 +1014,7 @@ class Image(object):
|
|||
if trns is not None:
|
||||
try:
|
||||
new.info['transparency'] = new.palette.getcolor(trns)
|
||||
except:
|
||||
except Exception:
|
||||
# if we can't make a transparent color, don't leave the old
|
||||
# transparency hanging around to mess us up.
|
||||
del(new.info['transparency'])
|
||||
|
|
@ -1028,7 +1044,7 @@ class Image(object):
|
|||
if new_im.mode == 'P':
|
||||
try:
|
||||
new_im.info['transparency'] = new_im.palette.getcolor(trns)
|
||||
except:
|
||||
except Exception:
|
||||
del(new_im.info['transparency'])
|
||||
warnings.warn("Couldn't allocate palette entry " +
|
||||
"for transparency")
|
||||
|
|
@ -1047,7 +1063,8 @@ class Image(object):
|
|||
2 = fast octree
|
||||
3 = libimagequant
|
||||
:param kmeans: Integer
|
||||
:param palette: Quantize to the palette of given :py:class:`PIL.Image.Image`.
|
||||
:param palette: Quantize to the palette of given
|
||||
:py:class:`PIL.Image.Image`.
|
||||
:returns: A new image
|
||||
|
||||
"""
|
||||
|
|
@ -1634,7 +1651,8 @@ class Image(object):
|
|||
"""
|
||||
Modifies the pixel at the given position. The color is given as
|
||||
a single numerical value for single-band images, and a tuple for
|
||||
multi-band images.
|
||||
multi-band images. In addition to this, RGB and RGBA tuples are
|
||||
accepted for P images.
|
||||
|
||||
Note that this method is relatively slow. For more extensive changes,
|
||||
use :py:meth:`~PIL.Image.Image.paste` or the :py:mod:`~PIL.ImageDraw`
|
||||
|
|
@ -1657,6 +1675,11 @@ class Image(object):
|
|||
|
||||
if self.pyaccess:
|
||||
return self.pyaccess.putpixel(xy, value)
|
||||
|
||||
if self.mode == "P" and \
|
||||
isinstance(value, (list, tuple)) and len(value) in [3, 4]:
|
||||
# RGB or RGBA value for a P image
|
||||
value = self.palette.getcolor(value)
|
||||
return self.im.putpixel(xy, value)
|
||||
|
||||
def remap_palette(self, dest_map, source_palette=None):
|
||||
|
|
@ -1773,11 +1796,10 @@ class Image(object):
|
|||
if self.mode in ("1", "P"):
|
||||
resample = NEAREST
|
||||
|
||||
if self.mode == 'LA':
|
||||
return self.convert('La').resize(size, resample, box).convert('LA')
|
||||
|
||||
if self.mode == 'RGBA':
|
||||
return self.convert('RGBa').resize(size, resample, box).convert('RGBA')
|
||||
if self.mode in ['LA', 'RGBA']:
|
||||
im = self.convert(self.mode[:-1]+'a')
|
||||
im = im.resize(size, resample, box)
|
||||
return im.convert(self.mode)
|
||||
|
||||
self.load()
|
||||
|
||||
|
|
@ -1849,7 +1871,8 @@ class Image(object):
|
|||
else:
|
||||
post_trans = translate
|
||||
if center is None:
|
||||
rotn_center = (w / 2.0, h / 2.0) # FIXME These should be rounded to ints?
|
||||
# FIXME These should be rounded to ints?
|
||||
rotn_center = (w / 2.0, h / 2.0)
|
||||
else:
|
||||
rotn_center = center
|
||||
|
||||
|
|
@ -1864,7 +1887,8 @@ class Image(object):
|
|||
return a*x + b*y + c, d*x + e*y + f
|
||||
|
||||
matrix[2], matrix[5] = transform(-rotn_center[0] - post_trans[0],
|
||||
-rotn_center[1] - post_trans[1], matrix)
|
||||
-rotn_center[1] - post_trans[1],
|
||||
matrix)
|
||||
matrix[2] += rotn_center[0]
|
||||
matrix[5] += rotn_center[1]
|
||||
|
||||
|
|
@ -1887,7 +1911,8 @@ class Image(object):
|
|||
matrix)
|
||||
w, h = nw, nh
|
||||
|
||||
return self.transform((w, h), AFFINE, matrix, resample, fillcolor=fillcolor)
|
||||
return self.transform((w, h), AFFINE, matrix, resample,
|
||||
fillcolor=fillcolor)
|
||||
|
||||
def save(self, fp, format=None, **params):
|
||||
"""
|
||||
|
|
@ -2154,8 +2179,8 @@ class Image(object):
|
|||
:param fill: If **method** is an
|
||||
:py:class:`~PIL.Image.ImageTransformHandler` object, this is one of
|
||||
the arguments passed to it. Otherwise, it is unused.
|
||||
:param fillcolor: Optional fill color for the area outside the transform
|
||||
in the output image.
|
||||
:param fillcolor: Optional fill color for the area outside the
|
||||
transform in the output image.
|
||||
:returns: An :py:class:`~PIL.Image.Image` object.
|
||||
"""
|
||||
|
||||
|
|
@ -2620,6 +2645,7 @@ def open(fp, mode="r"):
|
|||
preinit()
|
||||
|
||||
accept_warnings = []
|
||||
|
||||
def _open_core(fp, filename, prefix):
|
||||
for i in ID:
|
||||
try:
|
||||
|
|
@ -2637,6 +2663,10 @@ def open(fp, mode="r"):
|
|||
# opening failures that are entirely expected.
|
||||
# logger.debug("", exc_info=True)
|
||||
continue
|
||||
except Exception:
|
||||
if exclusive_fp:
|
||||
fp.close()
|
||||
raise
|
||||
return None
|
||||
|
||||
im = _open_core(fp, filename, prefix)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ def invert(image):
|
|||
def lighter(image1, image2):
|
||||
"""
|
||||
Compares the two images, pixel by pixel, and returns a new image containing
|
||||
the lighter values.
|
||||
the lighter values. At least one of the images must have mode "1".
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -70,8 +70,8 @@ def lighter(image1, image2):
|
|||
|
||||
def darker(image1, image2):
|
||||
"""
|
||||
Compares the two images, pixel by pixel, and returns a new image
|
||||
containing the darker values.
|
||||
Compares the two images, pixel by pixel, and returns a new image containing
|
||||
the darker values. At least one of the images must have mode "1".
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ def darker(image1, image2):
|
|||
def difference(image1, image2):
|
||||
"""
|
||||
Returns the absolute value of the pixel-by-pixel difference between the two
|
||||
images.
|
||||
images. At least one of the images must have mode "1".
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -107,7 +107,8 @@ def multiply(image1, image2):
|
|||
Superimposes two images on top of each other.
|
||||
|
||||
If you multiply an image with a solid black image, the result is black. If
|
||||
you multiply with a solid white image, the image is unaffected.
|
||||
you multiply with a solid white image, the image is unaffected. At least
|
||||
one of the images must have mode "1".
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -123,7 +124,8 @@ def multiply(image1, image2):
|
|||
|
||||
def screen(image1, image2):
|
||||
"""
|
||||
Superimposes two inverted images on top of each other.
|
||||
Superimposes two inverted images on top of each other. At least one of the
|
||||
images must have mode "1".
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -141,6 +143,7 @@ def add(image1, image2, scale=1.0, offset=0):
|
|||
"""
|
||||
Adds two images, dividing the result by scale and adding the
|
||||
offset. If omitted, scale defaults to 1.0, and offset to 0.0.
|
||||
At least one of the images must have mode "1".
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -156,8 +159,9 @@ def add(image1, image2, scale=1.0, offset=0):
|
|||
|
||||
def subtract(image1, image2, scale=1.0, offset=0):
|
||||
"""
|
||||
Subtracts two images, dividing the result by scale and adding the
|
||||
offset. If omitted, scale defaults to 1.0, and offset to 0.0.
|
||||
Subtracts two images, dividing the result by scale and adding the offset.
|
||||
If omitted, scale defaults to 1.0, and offset to 0.0. At least one of the
|
||||
images must have mode "1".
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -172,7 +176,8 @@ def subtract(image1, image2, scale=1.0, offset=0):
|
|||
|
||||
|
||||
def add_modulo(image1, image2):
|
||||
"""Add two images, without clipping the result.
|
||||
"""Add two images, without clipping the result. At least one of the images
|
||||
must have mode "1".
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -187,7 +192,8 @@ def add_modulo(image1, image2):
|
|||
|
||||
|
||||
def subtract_modulo(image1, image2):
|
||||
"""Subtract two images, without clipping the result.
|
||||
"""Subtract two images, without clipping the result. At least one of the
|
||||
images must have mode "1".
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -202,7 +208,8 @@ def subtract_modulo(image1, image2):
|
|||
|
||||
|
||||
def logical_and(image1, image2):
|
||||
"""Logical AND between two images.
|
||||
"""Logical AND between two images. At least one of the images must have
|
||||
mode "1".
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -217,7 +224,8 @@ def logical_and(image1, image2):
|
|||
|
||||
|
||||
def logical_or(image1, image2):
|
||||
"""Logical OR between two images.
|
||||
"""Logical OR between two images. At least one of the images must have
|
||||
mode "1".
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -232,7 +240,8 @@ def logical_or(image1, image2):
|
|||
|
||||
|
||||
def logical_xor(image1, image2):
|
||||
"""Logical XOR between two images.
|
||||
"""Logical XOR between two images. At least one of the images must have
|
||||
mode "1".
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
|
|||
|
|
@ -647,7 +647,7 @@ def createProfile(colorSpace, colorTemp=-1):
|
|||
if colorSpace == "LAB":
|
||||
try:
|
||||
colorTemp = float(colorTemp)
|
||||
except:
|
||||
except (TypeError, ValueError):
|
||||
raise PyCMSError(
|
||||
"Color temperature must be numeric, \"%s\" not valid"
|
||||
% colorTemp)
|
||||
|
|
@ -727,7 +727,7 @@ def getProfileInfo(profile):
|
|||
# add an extra newline to preserve pyCMS compatibility
|
||||
# Python, not C. the white point bits weren't working well,
|
||||
# so skipping.
|
||||
# // info was description \r\n\r\n copyright \r\n\r\n K007 tag \r\n\r\n whitepoint
|
||||
# info was description \r\n\r\n copyright \r\n\r\n K007 tag \r\n\r\n whitepoint
|
||||
description = profile.profile.product_description
|
||||
cpright = profile.profile.product_copyright
|
||||
arr = []
|
||||
|
|
|
|||
|
|
@ -87,7 +87,10 @@ def getrgb(color):
|
|||
int((int(m.group(3)) * 255) / 100.0 + 0.5)
|
||||
)
|
||||
|
||||
m = re.match(r"hsl\(\s*(\d+\.?\d*)\s*,\s*(\d+\.?\d*)%\s*,\s*(\d+\.?\d*)%\s*\)$", color)
|
||||
m = re.match(
|
||||
r"hsl\(\s*(\d+\.?\d*)\s*,\s*(\d+\.?\d*)%\s*,\s*(\d+\.?\d*)%\s*\)$",
|
||||
color,
|
||||
)
|
||||
if m:
|
||||
from colorsys import hls_to_rgb
|
||||
rgb = hls_to_rgb(
|
||||
|
|
@ -101,7 +104,10 @@ def getrgb(color):
|
|||
int(rgb[2] * 255 + 0.5)
|
||||
)
|
||||
|
||||
m = re.match(r"hs[bv]\(\s*(\d+\.?\d*)\s*,\s*(\d+\.?\d*)%\s*,\s*(\d+\.?\d*)%\s*\)$", color)
|
||||
m = re.match(
|
||||
r"hs[bv]\(\s*(\d+\.?\d*)\s*,\s*(\d+\.?\d*)%\s*,\s*(\d+\.?\d*)%\s*\)$",
|
||||
color,
|
||||
)
|
||||
if m:
|
||||
from colorsys import hsv_to_rgb
|
||||
rgb = hsv_to_rgb(
|
||||
|
|
|
|||
|
|
@ -391,8 +391,8 @@ def floodfill(image, xy, value, border=None, thresh=0):
|
|||
pixel.
|
||||
:param thresh: Optional threshold value which specifies a maximum
|
||||
tolerable difference of a pixel value from the 'background' in
|
||||
order for it to be replaced. Useful for filling regions of non-
|
||||
homogeneous, but similar, colors.
|
||||
order for it to be replaced. Useful for filling regions of
|
||||
non-homogeneous, but similar, colors.
|
||||
"""
|
||||
# based on an implementation by Eric S. Raymond
|
||||
# amended by yo1995 @20180806
|
||||
|
|
@ -406,7 +406,9 @@ def floodfill(image, xy, value, border=None, thresh=0):
|
|||
except (ValueError, IndexError):
|
||||
return # seed point outside image
|
||||
edge = {(x, y)}
|
||||
full_edge = set() # use a set to keep record of current and previous edge pixels to reduce memory consumption
|
||||
# use a set to keep record of current and previous edge pixels
|
||||
# to reduce memory consumption
|
||||
full_edge = set()
|
||||
while edge:
|
||||
new_edge = set()
|
||||
for (x, y) in edge: # 4 adjacent method
|
||||
|
|
|
|||
|
|
@ -79,6 +79,8 @@ class ImageFile(Image.Image):
|
|||
|
||||
self._min_frame = 0
|
||||
|
||||
self.custom_mimetype = None
|
||||
|
||||
self.tile = None
|
||||
self.readonly = 1 # until we know better
|
||||
|
||||
|
|
@ -120,7 +122,7 @@ class ImageFile(Image.Image):
|
|||
def get_format_mimetype(self):
|
||||
if self.format is None:
|
||||
return
|
||||
return Image.MIME.get(self.format.upper())
|
||||
return self.custom_mimetype or Image.MIME.get(self.format.upper())
|
||||
|
||||
def verify(self):
|
||||
"Check file integrity"
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ class UnsharpMask(MultibandFilter):
|
|||
|
||||
.. _digital unsharp masking: https://en.wikipedia.org/wiki/Unsharp_masking#Digital_unsharp_masking
|
||||
|
||||
"""
|
||||
""" # noqa: E501
|
||||
name = "UnsharpMask"
|
||||
|
||||
def __init__(self, radius=2, percent=150, threshold=3):
|
||||
|
|
@ -467,7 +467,7 @@ class Color3DLUT(MultibandFilter):
|
|||
def __repr__(self):
|
||||
r = [
|
||||
"{} from {}".format(self.__class__.__name__,
|
||||
self.table.__class__.__name__),
|
||||
self.table.__class__.__name__),
|
||||
"size={:d}x{:d}x{:d}".format(*self.size),
|
||||
"channels={:d}".format(self.channels),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class ImageFont(object):
|
|||
try:
|
||||
fullname = os.path.splitext(filename)[0] + ext
|
||||
image = Image.open(fullname)
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
if image and image.mode in ("1", "L"):
|
||||
|
|
@ -203,7 +203,7 @@ class FreeTypeFont(object):
|
|||
size=self.size if size is None else size,
|
||||
index=self.index if index is None else index,
|
||||
encoding=self.encoding if encoding is None else encoding,
|
||||
layout_engine=self.layout_engine if layout_engine is None else layout_engine
|
||||
layout_engine=layout_engine or self.layout_engine
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -54,9 +54,10 @@ def grabclipboard():
|
|||
fh, filepath = tempfile.mkstemp('.jpg')
|
||||
os.close(fh)
|
||||
commands = [
|
||||
"set theFile to (open for access POSIX file \""+filepath+"\" with write permission)",
|
||||
"set theFile to (open for access POSIX file \""
|
||||
+ filepath + "\" with write permission)",
|
||||
"try",
|
||||
"write (the clipboard as JPEG picture) to theFile",
|
||||
" write (the clipboard as JPEG picture) to theFile",
|
||||
"end try",
|
||||
"close access theFile"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -380,9 +380,10 @@ def fit(image, size, method=Image.NEAREST, bleed=0.0, centering=(0.5, 0.5)):
|
|||
(width, height) tuple.
|
||||
:param method: What resampling method to use. Default is
|
||||
:py:attr:`PIL.Image.NEAREST`.
|
||||
:param bleed: Remove a border around the outside of the image (from all
|
||||
:param bleed: Remove a border around the outside of the image from all
|
||||
four edges. The value is a decimal percentage (use 0.01 for
|
||||
one percent). The default value is 0 (no border).
|
||||
Cannot be greater than or equal to 0.5.
|
||||
:param centering: Control the cropping position. Use (0.5, 0.5) for
|
||||
center cropping (e.g. if cropping the width, take 50% off
|
||||
of the left side, and therefore 50% off the right side).
|
||||
|
|
@ -400,66 +401,53 @@ def fit(image, size, method=Image.NEAREST, bleed=0.0, centering=(0.5, 0.5)):
|
|||
# kevin@cazabon.com
|
||||
# http://www.cazabon.com
|
||||
|
||||
# ensure inputs are valid
|
||||
if not isinstance(centering, list):
|
||||
centering = [centering[0], centering[1]]
|
||||
# ensure centering is mutable
|
||||
centering = list(centering)
|
||||
|
||||
if centering[0] > 1.0 or centering[0] < 0.0:
|
||||
centering[0] = 0.50
|
||||
if centering[1] > 1.0 or centering[1] < 0.0:
|
||||
centering[1] = 0.50
|
||||
if not 0.0 <= centering[0] <= 1.0:
|
||||
centering[0] = 0.5
|
||||
if not 0.0 <= centering[1] <= 1.0:
|
||||
centering[1] = 0.5
|
||||
|
||||
if bleed > 0.49999 or bleed < 0.0:
|
||||
if not 0.0 <= bleed < 0.5:
|
||||
bleed = 0.0
|
||||
|
||||
# calculate the area to use for resizing and cropping, subtracting
|
||||
# the 'bleed' around the edges
|
||||
|
||||
# number of pixels to trim off on Top and Bottom, Left and Right
|
||||
bleedPixels = (
|
||||
int((float(bleed) * float(image.size[0])) + 0.5),
|
||||
int((float(bleed) * float(image.size[1])) + 0.5)
|
||||
)
|
||||
bleed_pixels = (bleed * image.size[0], bleed * image.size[1])
|
||||
|
||||
liveArea = (0, 0, image.size[0], image.size[1])
|
||||
if bleed > 0.0:
|
||||
liveArea = (
|
||||
bleedPixels[0], bleedPixels[1], image.size[0] - bleedPixels[0] - 1,
|
||||
image.size[1] - bleedPixels[1] - 1
|
||||
)
|
||||
live_size = (image.size[0] - bleed_pixels[0] * 2,
|
||||
image.size[1] - bleed_pixels[1] * 2)
|
||||
|
||||
liveSize = (liveArea[2] - liveArea[0], liveArea[3] - liveArea[1])
|
||||
|
||||
# calculate the aspect ratio of the liveArea
|
||||
liveAreaAspectRatio = float(liveSize[0])/float(liveSize[1])
|
||||
# calculate the aspect ratio of the live_size
|
||||
live_size_ratio = float(live_size[0]) / live_size[1]
|
||||
|
||||
# calculate the aspect ratio of the output image
|
||||
aspectRatio = float(size[0]) / float(size[1])
|
||||
output_ratio = float(size[0]) / size[1]
|
||||
|
||||
# figure out if the sides or top/bottom will be cropped off
|
||||
if liveAreaAspectRatio >= aspectRatio:
|
||||
# liveArea is wider than what's needed, crop the sides
|
||||
cropWidth = int((aspectRatio * float(liveSize[1])) + 0.5)
|
||||
cropHeight = liveSize[1]
|
||||
if live_size_ratio >= output_ratio:
|
||||
# live_size is wider than what's needed, crop the sides
|
||||
crop_width = output_ratio * live_size[1]
|
||||
crop_height = live_size[1]
|
||||
else:
|
||||
# liveArea is taller than what's needed, crop the top and bottom
|
||||
cropWidth = liveSize[0]
|
||||
cropHeight = int((float(liveSize[0])/aspectRatio) + 0.5)
|
||||
# live_size is taller than what's needed, crop the top and bottom
|
||||
crop_width = live_size[0]
|
||||
crop_height = live_size[0] / output_ratio
|
||||
|
||||
# make the crop
|
||||
leftSide = int(liveArea[0] + (float(liveSize[0]-cropWidth) * centering[0]))
|
||||
if leftSide < 0:
|
||||
leftSide = 0
|
||||
topSide = int(liveArea[1] + (float(liveSize[1]-cropHeight) * centering[1]))
|
||||
if topSide < 0:
|
||||
topSide = 0
|
||||
crop_left = bleed_pixels[0] + (live_size[0]-crop_width) * centering[0]
|
||||
crop_top = bleed_pixels[1] + (live_size[1]-crop_height) * centering[1]
|
||||
|
||||
out = image.crop(
|
||||
(leftSide, topSide, leftSide + cropWidth, topSide + cropHeight)
|
||||
)
|
||||
crop = (
|
||||
crop_left, crop_top,
|
||||
crop_left + crop_width, crop_top + crop_height
|
||||
)
|
||||
|
||||
# resize the image and return it
|
||||
return out.resize(size, method)
|
||||
return image.resize(size, method, box=crop)
|
||||
|
||||
|
||||
def flip(image):
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ def _toqclass_helper(im):
|
|||
if py3:
|
||||
im = str(im.toUtf8(), "utf-8")
|
||||
else:
|
||||
im = unicode(im.toUtf8(), "utf-8")
|
||||
im = unicode(im.toUtf8(), "utf-8") # noqa: F821
|
||||
if isPath(im):
|
||||
im = Image.open(im)
|
||||
|
||||
|
|
@ -185,8 +185,8 @@ if qt_is_installed:
|
|||
An PIL image wrapper for Qt. This is a subclass of PyQt's QImage
|
||||
class.
|
||||
|
||||
:param im: A PIL Image object, or a file name (given either as Python
|
||||
string or a PyQt string object).
|
||||
:param im: A PIL Image object, or a file name (given either as
|
||||
Python string or a PyQt string object).
|
||||
"""
|
||||
im_data = _toqclass_helper(im)
|
||||
# must keep a reference, or Qt will crash!
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ from __future__ import print_function
|
|||
from PIL import Image
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
if sys.version_info.major >= 3:
|
||||
from shlex import quote
|
||||
|
|
@ -128,6 +130,21 @@ elif sys.platform == "darwin":
|
|||
quote(file))
|
||||
return command
|
||||
|
||||
def show_file(self, file, **options):
|
||||
"""Display given file"""
|
||||
fd, path = tempfile.mkstemp()
|
||||
with os.fdopen(fd, 'w') as f:
|
||||
f.write(file)
|
||||
with open(path, "r") as f:
|
||||
subprocess.Popen([
|
||||
'im=$(cat);'
|
||||
'open -a /Applications/Preview.app $im;'
|
||||
'sleep 20;'
|
||||
'rm -f $im'
|
||||
], shell=True, stdin=f)
|
||||
os.remove(path)
|
||||
return 1
|
||||
|
||||
register(MacViewer)
|
||||
|
||||
else:
|
||||
|
|
@ -148,11 +165,23 @@ else:
|
|||
format = "PNG"
|
||||
options = {'compress_level': 1}
|
||||
|
||||
def get_command(self, file, **options):
|
||||
command = self.get_command_ex(file, **options)[0]
|
||||
return "(%s %s; rm -f %s)&" % (command, quote(file), quote(file))
|
||||
|
||||
def show_file(self, file, **options):
|
||||
command, executable = self.get_command_ex(file, **options)
|
||||
command = "(%s %s; rm -f %s)&" % (command, quote(file),
|
||||
quote(file))
|
||||
os.system(command)
|
||||
"""Display given file"""
|
||||
fd, path = tempfile.mkstemp()
|
||||
with os.fdopen(fd, 'w') as f:
|
||||
f.write(file)
|
||||
with open(path, "r") as f:
|
||||
command = self.get_command_ex(file, **options)[0]
|
||||
subprocess.Popen([
|
||||
'im=$(cat);' +
|
||||
command+' $im;'
|
||||
'rm -f $im'
|
||||
], shell=True, stdin=f)
|
||||
os.remove(path)
|
||||
return 1
|
||||
|
||||
# implementations
|
||||
|
|
|
|||
|
|
@ -26,15 +26,15 @@
|
|||
#
|
||||
|
||||
import sys
|
||||
from io import BytesIO
|
||||
|
||||
from . import Image
|
||||
|
||||
if sys.version_info.major > 2:
|
||||
import tkinter
|
||||
else:
|
||||
import Tkinter as tkinter
|
||||
|
||||
from . import Image
|
||||
from io import BytesIO
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Check for Tkinter interface hooks
|
||||
|
|
@ -124,7 +124,7 @@ class PhotoImage(object):
|
|||
self.__photo.name = None
|
||||
try:
|
||||
self.__photo.tk.call("image", "delete", name)
|
||||
except:
|
||||
except Exception:
|
||||
pass # ignore internal errors
|
||||
|
||||
def __str__(self):
|
||||
|
|
@ -244,7 +244,7 @@ class BitmapImage(object):
|
|||
self.__photo.name = None
|
||||
try:
|
||||
self.__photo.tk.call("image", "delete", name)
|
||||
except:
|
||||
except Exception:
|
||||
pass # ignore internal errors
|
||||
|
||||
def width(self):
|
||||
|
|
|
|||
|
|
@ -181,14 +181,14 @@ class Jpeg2KImageFile(ImageFile.ImageFile):
|
|||
try:
|
||||
fd = self.fp.fileno()
|
||||
length = os.fstat(fd).st_size
|
||||
except:
|
||||
except Exception:
|
||||
fd = -1
|
||||
try:
|
||||
pos = self.fp.tell()
|
||||
self.fp.seek(0, 2)
|
||||
length = self.fp.tell()
|
||||
self.fp.seek(pos, 0)
|
||||
except:
|
||||
except Exception:
|
||||
length = -1
|
||||
|
||||
self.tile = [('jpeg2k', (0, 0) + self.size, 0,
|
||||
|
|
@ -232,6 +232,13 @@ def _save(im, fp, filename):
|
|||
tile_size = info.get('tile_size', None)
|
||||
quality_mode = info.get('quality_mode', 'rates')
|
||||
quality_layers = info.get('quality_layers', None)
|
||||
if quality_layers is not None and not (
|
||||
isinstance(quality_layers, (list, tuple)) and
|
||||
all([isinstance(quality_layer, (int, float))
|
||||
for quality_layer in quality_layers])
|
||||
):
|
||||
raise ValueError('quality_layers must be a sequence of numbers')
|
||||
|
||||
num_resolutions = info.get('num_resolutions', 0)
|
||||
cblk_size = info.get('codeblock_size', None)
|
||||
precinct_size = info.get('precinct_size', None)
|
||||
|
|
@ -243,7 +250,7 @@ def _save(im, fp, filename):
|
|||
if hasattr(fp, "fileno"):
|
||||
try:
|
||||
fd = fp.fileno()
|
||||
except:
|
||||
except Exception:
|
||||
fd = -1
|
||||
|
||||
im.encoderconfig = (
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ def APP(self, marker):
|
|||
try:
|
||||
jfif_unit = i8(s[7])
|
||||
jfif_density = i16(s, 8), i16(s, 10)
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
if jfif_unit == 1:
|
||||
|
|
@ -107,7 +107,7 @@ def APP(self, marker):
|
|||
# extract Adobe custom properties
|
||||
try:
|
||||
adobe_transform = i8(s[1])
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
self.info["adobe_transform"] = adobe_transform
|
||||
|
|
@ -441,7 +441,7 @@ def _fixup_dict(src_dict):
|
|||
try:
|
||||
if len(value) == 1 and not isinstance(value, dict):
|
||||
return value[0]
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
return value
|
||||
|
||||
|
|
@ -512,7 +512,7 @@ def _getmp(self):
|
|||
info = TiffImagePlugin.ImageFileDirectory_v2(head)
|
||||
info.load(file_contents)
|
||||
mp = dict(info)
|
||||
except:
|
||||
except Exception:
|
||||
raise SyntaxError("malformed MP Index (unreadable directory)")
|
||||
# it's an error not to have a number of images
|
||||
try:
|
||||
|
|
@ -578,7 +578,7 @@ RAWMODE = {
|
|||
"YCbCr": "YCbCr",
|
||||
}
|
||||
|
||||
zigzag_index = (0, 1, 5, 6, 14, 15, 27, 28,
|
||||
zigzag_index = (0, 1, 5, 6, 14, 15, 27, 28, # noqa: E128
|
||||
2, 4, 7, 13, 16, 26, 29, 42,
|
||||
3, 8, 12, 17, 25, 30, 41, 43,
|
||||
9, 11, 18, 24, 31, 40, 44, 53,
|
||||
|
|
|
|||
|
|
@ -62,11 +62,12 @@ The tables format between im.quantization and quantization in presets differ in
|
|||
You can convert the dict format to the preset format with the
|
||||
`JpegImagePlugin.convert_dict_qtables(dict_qtables)` function.
|
||||
|
||||
Libjpeg ref.: https://web.archive.org/web/20120328125543/http://www.jpegcameras.com/libjpeg/libjpeg-3.html
|
||||
Libjpeg ref.:
|
||||
https://web.archive.org/web/20120328125543/http://www.jpegcameras.com/libjpeg/libjpeg-3.html
|
||||
|
||||
"""
|
||||
|
||||
presets = {
|
||||
presets = { # noqa: E128
|
||||
'web_low': {'subsampling': 2, # "4:2:0"
|
||||
'quantization': [
|
||||
[20, 16, 25, 39, 50, 46, 62, 68,
|
||||
|
|
|
|||
|
|
@ -95,9 +95,17 @@ class MicImageFile(TiffImagePlugin.TiffImageFile):
|
|||
self.frame = frame
|
||||
|
||||
def tell(self):
|
||||
|
||||
return self.frame
|
||||
|
||||
def _close__fp(self):
|
||||
try:
|
||||
if self.__fp != self.fp:
|
||||
self.__fp.close()
|
||||
except AttributeError:
|
||||
pass
|
||||
finally:
|
||||
self.__fp = None
|
||||
|
||||
|
||||
#
|
||||
# --------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -84,6 +84,15 @@ class MpoImageFile(JpegImagePlugin.JpegImageFile):
|
|||
def tell(self):
|
||||
return self.__frame
|
||||
|
||||
def _close__fp(self):
|
||||
try:
|
||||
if self.__fp != self.fp:
|
||||
self.__fp.close()
|
||||
except AttributeError:
|
||||
pass
|
||||
finally:
|
||||
self.__fp = None
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Registry stuff
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ from ._binary import o8, o16be as o16b
|
|||
|
||||
__version__ = "1.0"
|
||||
|
||||
_Palm8BitColormapValues = (
|
||||
_Palm8BitColormapValues = ( # noqa: E131
|
||||
(255, 255, 255), (255, 204, 255), (255, 153, 255), (255, 102, 255),
|
||||
(255, 51, 255), (255, 0, 255), (255, 255, 204), (255, 204, 204),
|
||||
(255, 153, 204), (255, 102, 204), (255, 51, 204), (255, 0, 204),
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ class PcfFontFile(FontFile.FontFile):
|
|||
firstCol, lastCol = i16(fp.read(2)), i16(fp.read(2))
|
||||
firstRow, lastRow = i16(fp.read(2)), i16(fp.read(2))
|
||||
|
||||
default = i16(fp.read(2))
|
||||
i16(fp.read(2)) # default
|
||||
|
||||
nencoding = (lastCol - firstCol + 1) * (lastRow - firstRow + 1)
|
||||
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ def pdf_repr(x):
|
|||
elif isinstance(x, list):
|
||||
return bytes(PdfArray(x))
|
||||
elif ((py3 and isinstance(x, str)) or
|
||||
(not py3 and isinstance(x, unicode))):
|
||||
(not py3 and isinstance(x, unicode))): # noqa: F821
|
||||
return pdf_repr(encode_text(x))
|
||||
elif isinstance(x, bytes):
|
||||
# XXX escape more chars? handle binary garbage
|
||||
|
|
@ -386,7 +386,8 @@ def pdf_repr(x):
|
|||
|
||||
|
||||
class PdfParser:
|
||||
"""Based on https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf
|
||||
"""Based on
|
||||
https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf
|
||||
Supports PDF up to 1.4
|
||||
"""
|
||||
|
||||
|
|
@ -863,7 +864,8 @@ class PdfParser:
|
|||
raise PdfFormatError(
|
||||
"unrecognized object: " + repr(data[offset:offset+32]))
|
||||
|
||||
re_lit_str_token = re.compile(br"(\\[nrtbf()\\])|(\\[0-9]{1,3})|(\\(\r\n|\r|\n))|(\r\n|\r|\n)|(\()|(\))")
|
||||
re_lit_str_token = re.compile(
|
||||
br"(\\[nrtbf()\\])|(\\[0-9]{1,3})|(\\(\r\n|\r|\n))|(\r\n|\r|\n)|(\()|(\))")
|
||||
escaped_chars = {
|
||||
b"n": b"\n",
|
||||
b"r": b"\r",
|
||||
|
|
|
|||
|
|
@ -296,6 +296,7 @@ class PngStream(ChunkStream):
|
|||
self.im_mode = None
|
||||
self.im_tile = None
|
||||
self.im_palette = None
|
||||
self.im_custom_mimetype = None
|
||||
|
||||
self.text_memory = 0
|
||||
|
||||
|
|
@ -340,7 +341,7 @@ class PngStream(ChunkStream):
|
|||
self.im_size = i32(s), i32(s[4:])
|
||||
try:
|
||||
self.im_mode, self.im_rawmode = _MODES[(i8(s[8]), i8(s[9]))]
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
if i8(s[12]):
|
||||
self.im_info["interlace"] = 1
|
||||
|
|
@ -526,6 +527,20 @@ class PngStream(ChunkStream):
|
|||
|
||||
return s
|
||||
|
||||
# APNG chunks
|
||||
def chunk_acTL(self, pos, length):
|
||||
s = ImageFile._safe_read(self.fp, length)
|
||||
self.im_custom_mimetype = 'image/apng'
|
||||
return s
|
||||
|
||||
def chunk_fcTL(self, pos, length):
|
||||
s = ImageFile._safe_read(self.fp, length)
|
||||
return s
|
||||
|
||||
def chunk_fdAT(self, pos, length):
|
||||
s = ImageFile._safe_read(self.fp, length)
|
||||
return s
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# PNG reader
|
||||
|
|
@ -579,8 +594,9 @@ class PngImageFile(ImageFile.ImageFile):
|
|||
self.mode = self.png.im_mode
|
||||
self._size = self.png.im_size
|
||||
self.info = self.png.im_info
|
||||
self.text = self.png.im_text # experimental
|
||||
self._text = None
|
||||
self.tile = self.png.im_tile
|
||||
self.custom_mimetype = self.png.im_custom_mimetype
|
||||
|
||||
if self.png.im_palette:
|
||||
rawmode, data = self.png.im_palette
|
||||
|
|
@ -588,6 +604,15 @@ class PngImageFile(ImageFile.ImageFile):
|
|||
|
||||
self.__idat = length # used by load_read()
|
||||
|
||||
@property
|
||||
def text(self):
|
||||
# experimental
|
||||
if self._text is None:
|
||||
# iTxt, tEXt and zTXt chunks may appear at the end of the file
|
||||
# So load the file to ensure that they are read
|
||||
self.load()
|
||||
return self._text
|
||||
|
||||
def verify(self):
|
||||
"Verify PNG file"
|
||||
|
||||
|
|
@ -600,6 +625,8 @@ class PngImageFile(ImageFile.ImageFile):
|
|||
self.png.verify()
|
||||
self.png.close()
|
||||
|
||||
if self._exclusive_fp:
|
||||
self.fp.close()
|
||||
self.fp = None
|
||||
|
||||
def load_prepare(self):
|
||||
|
|
@ -638,7 +665,24 @@ class PngImageFile(ImageFile.ImageFile):
|
|||
|
||||
def load_end(self):
|
||||
"internal: finished reading image data"
|
||||
while True:
|
||||
self.fp.read(4) # CRC
|
||||
|
||||
try:
|
||||
cid, pos, length = self.png.read()
|
||||
except (struct.error, SyntaxError):
|
||||
break
|
||||
|
||||
if cid == b"IEND":
|
||||
break
|
||||
|
||||
try:
|
||||
self.png.call(cid, pos, length)
|
||||
except UnicodeDecodeError:
|
||||
break
|
||||
except EOFError:
|
||||
ImageFile._safe_read(self.fp, length)
|
||||
self._text = self.png.im_text
|
||||
self.png.close()
|
||||
self.png = None
|
||||
|
||||
|
|
@ -866,6 +910,6 @@ def getchunks(im, **params):
|
|||
Image.register_open(PngImageFile.format, PngImageFile, _accept)
|
||||
Image.register_save(PngImageFile.format, _save)
|
||||
|
||||
Image.register_extension(PngImageFile.format, ".png")
|
||||
Image.register_extensions(PngImageFile.format, [".png", ".apng"])
|
||||
|
||||
Image.register_mime(PngImageFile.format, "image/png")
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class PsdImageFile(ImageFile.ImageFile):
|
|||
# load resources
|
||||
end = self.fp.tell() + size
|
||||
while self.fp.tell() < end:
|
||||
signature = read(4)
|
||||
read(4) # signature
|
||||
id = i16(read(2))
|
||||
name = read(i8(read(1)))
|
||||
if not (len(name) & 1):
|
||||
|
|
@ -207,17 +207,13 @@ def _layerinfo(file):
|
|||
mode = None # unknown
|
||||
|
||||
# skip over blend flags and extra information
|
||||
filler = read(12)
|
||||
read(12) # filler
|
||||
name = ""
|
||||
size = i32(read(4))
|
||||
combined = 0
|
||||
if size:
|
||||
length = i32(read(4))
|
||||
if length:
|
||||
mask_y = i32(read(4))
|
||||
mask_x = i32(read(4))
|
||||
mask_h = i32(read(4)) - mask_y
|
||||
mask_w = i32(read(4)) - mask_x
|
||||
file.seek(length - 16, 1)
|
||||
combined += length + 4
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ class PyAccess(object):
|
|||
|
||||
# Keep pointer to im object to prevent dereferencing.
|
||||
self._im = img.im
|
||||
if self._im.mode == "P":
|
||||
self._palette = img.palette
|
||||
|
||||
# Debugging is polluting test traces, only useful here
|
||||
# when hacking on PyAccess
|
||||
|
|
@ -74,7 +76,18 @@ class PyAccess(object):
|
|||
"""
|
||||
if self.readonly:
|
||||
raise ValueError('Attempt to putpixel a read only image')
|
||||
(x, y) = self.check_xy(xy)
|
||||
(x, y) = xy
|
||||
if x < 0:
|
||||
x = self.xsize + x
|
||||
if y < 0:
|
||||
y = self.ysize + y
|
||||
(x, y) = self.check_xy((x, y))
|
||||
|
||||
if self._im.mode == "P" and \
|
||||
isinstance(color, (list, tuple)) and len(color) in [3, 4]:
|
||||
# RGB or RGBA value for a P image
|
||||
color = self._palette.getcolor(color)
|
||||
|
||||
return self.set_pixel(x, y, color)
|
||||
|
||||
def __getitem__(self, xy):
|
||||
|
|
@ -88,8 +101,12 @@ class PyAccess(object):
|
|||
:returns: a pixel value for single band images, a tuple of
|
||||
pixel values for multiband images.
|
||||
"""
|
||||
|
||||
(x, y) = self.check_xy(xy)
|
||||
(x, y) = xy
|
||||
if x < 0:
|
||||
x = self.xsize + x
|
||||
if y < 0:
|
||||
y = self.ysize + y
|
||||
(x, y) = self.check_xy((x, y))
|
||||
return self.get_pixel(x, y)
|
||||
|
||||
putpixel = __setitem__
|
||||
|
|
@ -205,7 +222,7 @@ class _PyAccessI16_L(PyAccess):
|
|||
except TypeError:
|
||||
color = min(color[0], 65535)
|
||||
|
||||
pixel.l = color & 0xFF
|
||||
pixel.l = color & 0xFF # noqa: E741
|
||||
pixel.r = color >> 8
|
||||
|
||||
|
||||
|
|
@ -222,10 +239,10 @@ class _PyAccessI16_B(PyAccess):
|
|||
pixel = self.pixels[y][x]
|
||||
try:
|
||||
color = min(color, 65535)
|
||||
except:
|
||||
except Exception:
|
||||
color = min(color[0], 65535)
|
||||
|
||||
pixel.l = color >> 8
|
||||
pixel.l = color >> 8 # noqa: E741
|
||||
pixel.r = color & 0xFF
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -193,6 +193,15 @@ class SpiderImageFile(ImageFile.ImageFile):
|
|||
from PIL import ImageTk
|
||||
return ImageTk.PhotoImage(self.convert2byte(), palette=256)
|
||||
|
||||
def _close__fp(self):
|
||||
try:
|
||||
if self.__fp != self.fp:
|
||||
self.__fp.close()
|
||||
except AttributeError:
|
||||
pass
|
||||
finally:
|
||||
self.__fp = None
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Image series
|
||||
|
|
@ -210,7 +219,7 @@ def loadImageSeries(filelist=None):
|
|||
continue
|
||||
try:
|
||||
im = Image.open(img).convert2byte()
|
||||
except:
|
||||
except Exception:
|
||||
if not isSpiderImage(img):
|
||||
print(img + " is not a Spider image file")
|
||||
continue
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
# See the README file for information on usage and redistribution.
|
||||
#
|
||||
|
||||
import sys
|
||||
from . import ContainerIO
|
||||
|
||||
|
||||
|
|
@ -30,11 +31,11 @@ class TarIO(ContainerIO.ContainerIO):
|
|||
:param tarfile: Name of TAR file.
|
||||
:param file: Name of member file.
|
||||
"""
|
||||
fh = open(tarfile, "rb")
|
||||
self.fh = open(tarfile, "rb")
|
||||
|
||||
while True:
|
||||
|
||||
s = fh.read(512)
|
||||
s = self.fh.read(512)
|
||||
if len(s) != 512:
|
||||
raise IOError("unexpected end of tar file")
|
||||
|
||||
|
|
@ -50,7 +51,21 @@ class TarIO(ContainerIO.ContainerIO):
|
|||
if file == name:
|
||||
break
|
||||
|
||||
fh.seek((size + 511) & (~511), 1)
|
||||
self.fh.seek((size + 511) & (~511), 1)
|
||||
|
||||
# Open region
|
||||
ContainerIO.ContainerIO.__init__(self, fh, fh.tell(), size)
|
||||
ContainerIO.ContainerIO.__init__(self, self.fh, self.fh.tell(), size)
|
||||
|
||||
# Context manager support
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
def __exit__(self, *args):
|
||||
self.close()
|
||||
|
||||
if sys.version_info.major >= 3:
|
||||
def __del__(self):
|
||||
self.close()
|
||||
|
||||
def close(self):
|
||||
self.fh.close()
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ import os
|
|||
import struct
|
||||
import sys
|
||||
import warnings
|
||||
import distutils.version
|
||||
|
||||
from .TiffTags import TYPES
|
||||
|
||||
|
|
@ -284,6 +285,10 @@ def _limit_rational(val, max_val):
|
|||
return n_d[::-1] if inv else n_d
|
||||
|
||||
|
||||
def _libtiff_version():
|
||||
return Image.core.libtiff_version.split("\n")[0].split("Version ")[1]
|
||||
|
||||
|
||||
##
|
||||
# Wrapper for TIFF IFDs.
|
||||
|
||||
|
|
@ -541,7 +546,7 @@ class ImageFileDirectory_v2(MutableMapping):
|
|||
def _setitem(self, tag, value, legacy_api):
|
||||
basetypes = (Number, bytes, str)
|
||||
if not py3:
|
||||
basetypes += unicode,
|
||||
basetypes += unicode, # noqa: F821
|
||||
|
||||
info = TiffTags.lookup(tag)
|
||||
values = [value] if isinstance(value, basetypes) else value
|
||||
|
|
@ -552,26 +557,26 @@ class ImageFileDirectory_v2(MutableMapping):
|
|||
else:
|
||||
self.tagtype[tag] = 7
|
||||
if all(isinstance(v, IFDRational) for v in values):
|
||||
self.tagtype[tag] = 5
|
||||
self.tagtype[tag] = TiffTags.RATIONAL
|
||||
elif all(isinstance(v, int) for v in values):
|
||||
if all(v < 2 ** 16 for v in values):
|
||||
self.tagtype[tag] = 3
|
||||
self.tagtype[tag] = TiffTags.SHORT
|
||||
else:
|
||||
self.tagtype[tag] = 4
|
||||
self.tagtype[tag] = TiffTags.LONG
|
||||
elif all(isinstance(v, float) for v in values):
|
||||
self.tagtype[tag] = 12
|
||||
self.tagtype[tag] = TiffTags.DOUBLE
|
||||
else:
|
||||
if py3:
|
||||
if all(isinstance(v, str) for v in values):
|
||||
self.tagtype[tag] = 2
|
||||
self.tagtype[tag] = TiffTags.ASCII
|
||||
else:
|
||||
# Never treat data as binary by default on Python 2.
|
||||
self.tagtype[tag] = 2
|
||||
self.tagtype[tag] = TiffTags.ASCII
|
||||
|
||||
if self.tagtype[tag] == 7 and py3:
|
||||
if self.tagtype[tag] == TiffTags.UNDEFINED and py3:
|
||||
values = [value.encode("ascii", 'replace') if isinstance(
|
||||
value, str) else value]
|
||||
elif self.tagtype[tag] == 5:
|
||||
elif self.tagtype[tag] == TiffTags.RATIONAL:
|
||||
values = [float(v) if isinstance(v, int) else v
|
||||
for v in values]
|
||||
|
||||
|
|
@ -587,14 +592,18 @@ class ImageFileDirectory_v2(MutableMapping):
|
|||
if (info.length == 1) or \
|
||||
(info.length is None and len(values) == 1 and not legacy_api):
|
||||
# Don't mess with the legacy api, since it's frozen.
|
||||
if legacy_api and self.tagtype[tag] in [5, 10]: # rationals
|
||||
if legacy_api and self.tagtype[tag] in [
|
||||
TiffTags.RATIONAL,
|
||||
TiffTags.SIGNED_RATIONAL
|
||||
]: # rationals
|
||||
values = values,
|
||||
try:
|
||||
dest[tag], = values
|
||||
except ValueError:
|
||||
# We've got a builtin tag with 1 expected entry
|
||||
warnings.warn(
|
||||
"Metadata Warning, tag %s had too many entries: %s, expected 1" % (
|
||||
"Metadata Warning, tag %s had too many entries: "
|
||||
"%s, expected 1" % (
|
||||
tag, len(values)))
|
||||
dest[tag] = values[0]
|
||||
|
||||
|
|
@ -622,13 +631,13 @@ class ImageFileDirectory_v2(MutableMapping):
|
|||
from .TiffTags import TYPES
|
||||
if func.__name__.startswith("load_"):
|
||||
TYPES[idx] = func.__name__[5:].replace("_", " ")
|
||||
_load_dispatch[idx] = size, func
|
||||
_load_dispatch[idx] = size, func # noqa: F821
|
||||
return func
|
||||
return decorator
|
||||
|
||||
def _register_writer(idx):
|
||||
def decorator(func):
|
||||
_write_dispatch[idx] = func
|
||||
_write_dispatch[idx] = func # noqa: F821
|
||||
return func
|
||||
return decorator
|
||||
|
||||
|
|
@ -637,19 +646,19 @@ class ImageFileDirectory_v2(MutableMapping):
|
|||
idx, fmt, name = idx_fmt_name
|
||||
TYPES[idx] = name
|
||||
size = struct.calcsize("=" + fmt)
|
||||
_load_dispatch[idx] = size, lambda self, data, legacy_api=True: (
|
||||
_load_dispatch[idx] = size, lambda self, data, legacy_api=True: ( # noqa: F821
|
||||
self._unpack("{}{}".format(len(data) // size, fmt), data))
|
||||
_write_dispatch[idx] = lambda self, *values: (
|
||||
_write_dispatch[idx] = lambda self, *values: ( # noqa: F821
|
||||
b"".join(self._pack(fmt, value) for value in values))
|
||||
|
||||
list(map(_register_basic,
|
||||
[(3, "H", "short"),
|
||||
(4, "L", "long"),
|
||||
(6, "b", "signed byte"),
|
||||
(8, "h", "signed short"),
|
||||
(9, "l", "signed long"),
|
||||
(11, "f", "float"),
|
||||
(12, "d", "double")]))
|
||||
[(TiffTags.SHORT, "H", "short"),
|
||||
(TiffTags.LONG, "L", "long"),
|
||||
(TiffTags.SIGNED_BYTE, "b", "signed byte"),
|
||||
(TiffTags.SIGNED_SHORT, "h", "signed short"),
|
||||
(TiffTags.SIGNED_LONG, "l", "signed long"),
|
||||
(TiffTags.FLOAT, "f", "float"),
|
||||
(TiffTags.DOUBLE, "d", "double")]))
|
||||
|
||||
@_register_loader(1, 1) # Basic type, except for the legacy API.
|
||||
def load_byte(self, data, legacy_api=True):
|
||||
|
|
@ -805,7 +814,10 @@ class ImageFileDirectory_v2(MutableMapping):
|
|||
print("- value:", values)
|
||||
|
||||
# count is sum of lengths for string and arbitrary data
|
||||
count = len(data) if typ in [2, 7] else len(values)
|
||||
if typ in [TiffTags.ASCII, TiffTags.UNDEFINED]:
|
||||
count = len(data)
|
||||
else:
|
||||
count = len(values)
|
||||
# figure out if data fits into the entry
|
||||
if len(data) <= 4:
|
||||
entries.append((tag, typ, count, data.ljust(4, b"\0"), b""))
|
||||
|
|
@ -1347,6 +1359,15 @@ class TiffImageFile(ImageFile.ImageFile):
|
|||
palette = [o8(b // 256) for b in self.tag_v2[COLORMAP]]
|
||||
self.palette = ImagePalette.raw("RGB;L", b"".join(palette))
|
||||
|
||||
def _close__fp(self):
|
||||
try:
|
||||
if self.__fp != self.fp:
|
||||
self.__fp.close()
|
||||
except AttributeError:
|
||||
pass
|
||||
finally:
|
||||
self.__fp = None
|
||||
|
||||
|
||||
#
|
||||
# --------------------------------------------------------------------
|
||||
|
|
@ -1412,7 +1433,7 @@ def _save(im, fp, filename):
|
|||
ifd[key] = info.get(key)
|
||||
try:
|
||||
ifd.tagtype[key] = info.tagtype[key]
|
||||
except:
|
||||
except Exception:
|
||||
pass # might not be an IFD, Might not have populated type
|
||||
|
||||
# additions written by Greg Couch, gregc@cgl.ucsf.edu
|
||||
|
|
@ -1499,14 +1520,19 @@ def _save(im, fp, filename):
|
|||
getattr(im, 'tag_v2', {}).items(),
|
||||
legacy_ifd.items()):
|
||||
# Libtiff can only process certain core items without adding
|
||||
# them to the custom dictionary. It will segfault if it attempts
|
||||
# to add a custom tag without the dictionary entry
|
||||
#
|
||||
# UNDONE -- add code for the custom dictionary
|
||||
# them to the custom dictionary.
|
||||
# Support for custom items has only been been added
|
||||
# for int, float, unicode, string and byte values
|
||||
if tag not in TiffTags.LIBTIFF_CORE:
|
||||
continue
|
||||
if TiffTags.lookup(tag).type == TiffTags.UNDEFINED:
|
||||
continue
|
||||
if (distutils.version.StrictVersion(_libtiff_version()) <
|
||||
distutils.version.StrictVersion("4.0")) \
|
||||
or not (isinstance(value, (int, float, str, bytes)) or
|
||||
(not py3 and isinstance(value, unicode))): # noqa: F821
|
||||
continue
|
||||
if tag not in atts and tag not in blocklist:
|
||||
if isinstance(value, str if py3 else unicode):
|
||||
if isinstance(value, str if py3 else unicode): # noqa: F821
|
||||
atts[tag] = value.encode('ascii', 'replace') + b"\0"
|
||||
elif isinstance(value, IFDRational):
|
||||
atts[tag] = float(value)
|
||||
|
|
@ -1784,7 +1810,7 @@ class AppendingTiffWriter:
|
|||
# local (not referenced with another offset)
|
||||
self.rewriteLastShortToLong(offset)
|
||||
self.f.seek(-10, os.SEEK_CUR)
|
||||
self.writeShort(4) # rewrite the type to LONG
|
||||
self.writeShort(TiffTags.LONG) # rewrite the type to LONG
|
||||
self.f.seek(8, os.SEEK_CUR)
|
||||
elif isShort:
|
||||
self.rewriteLastShort(offset)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,10 @@ class TagInfo(namedtuple("_TagInfo", "value name type length enum")):
|
|||
cls, value, name, type, length, enum or {})
|
||||
|
||||
def cvt_enum(self, value):
|
||||
return self.enum.get(value, value)
|
||||
# Using get will call hash(value), which can be expensive
|
||||
# for some types (e.g. Fraction). Since self.enum is rarely
|
||||
# used, it's usually better to test it first.
|
||||
return self.enum.get(value, value) if self.enum else value
|
||||
|
||||
|
||||
def lookup(tag):
|
||||
|
|
@ -61,8 +64,12 @@ ASCII = 2
|
|||
SHORT = 3
|
||||
LONG = 4
|
||||
RATIONAL = 5
|
||||
SIGNED_BYTE = 6
|
||||
UNDEFINED = 7
|
||||
SIGNED_SHORT = 8
|
||||
SIGNED_LONG = 9
|
||||
SIGNED_RATIONAL = 10
|
||||
FLOAT = 11
|
||||
DOUBLE = 12
|
||||
|
||||
TAGS_V2 = {
|
||||
|
|
@ -425,6 +432,7 @@ TYPES = {}
|
|||
|
||||
# some of these are not in our TAGS_V2 dict and were included from tiff.h
|
||||
|
||||
# This list also exists in encode.c
|
||||
LIBTIFF_CORE = {255, 256, 257, 258, 259, 262, 263, 266, 274, 277,
|
||||
278, 280, 281, 340, 341, 282, 283, 284, 286, 287,
|
||||
296, 297, 321, 320, 338, 32995, 322, 323, 32998,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from . import Image, ImageFile
|
|||
try:
|
||||
from . import _webp
|
||||
SUPPORTED = True
|
||||
except ImportError as e:
|
||||
except ImportError:
|
||||
SUPPORTED = False
|
||||
from io import BytesIO
|
||||
|
||||
|
|
@ -32,7 +32,8 @@ def _accept(prefix):
|
|||
|
||||
if is_riff_file_format and is_webp_file and is_valid_vp8_mode:
|
||||
if not SUPPORTED:
|
||||
return "image file could not be identified because WEBP support not installed"
|
||||
return "image file could not be identified " \
|
||||
"because WEBP support not installed"
|
||||
return True
|
||||
|
||||
|
||||
|
|
@ -163,7 +164,7 @@ class WebPImageFile(ImageFile.ImageFile):
|
|||
self.__loaded = self.__logical_frame
|
||||
|
||||
# Set tile
|
||||
if self.fp:
|
||||
if self.fp and self._exclusive_fp:
|
||||
self.fp.close()
|
||||
self.fp = BytesIO(data)
|
||||
self.tile = [("raw", (0, 0) + self.size, 0, self.rawmode)]
|
||||
|
|
@ -190,7 +191,19 @@ def _save_all(im, fp, filename):
|
|||
_save(im, fp, filename)
|
||||
return
|
||||
|
||||
background = encoderinfo.get("background", (0, 0, 0, 0))
|
||||
background = (0, 0, 0, 0)
|
||||
if "background" in encoderinfo:
|
||||
background = encoderinfo["background"]
|
||||
elif "background" in im.info:
|
||||
background = im.info["background"]
|
||||
if isinstance(background, int):
|
||||
# GifImagePlugin stores a global color table index in
|
||||
# info["background"]. So it must be converted to an RGBA value
|
||||
palette = im.getpalette()
|
||||
if palette:
|
||||
r, g, b = palette[background*3:(background+1)*3]
|
||||
background = (r, g, b, 0)
|
||||
|
||||
duration = im.encoderinfo.get("duration", 0)
|
||||
loop = im.encoderinfo.get("loop", 0)
|
||||
minimize_size = im.encoderinfo.get("minimize_size", False)
|
||||
|
|
@ -255,7 +268,8 @@ def _save_all(im, fp, filename):
|
|||
rawmode = ims.mode
|
||||
if ims.mode not in _VALID_WEBP_MODES:
|
||||
alpha = 'A' in ims.mode or 'a' in ims.mode \
|
||||
or (ims.mode == 'P' and 'A' in ims.im.getpalettemode())
|
||||
or (ims.mode == 'P' and
|
||||
'A' in ims.im.getpalettemode())
|
||||
rawmode = 'RGBA' if alpha else 'RGB'
|
||||
frame = ims.convert(rawmode)
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -11,10 +11,10 @@ if py3:
|
|||
return isinstance(f, (bytes, str))
|
||||
else:
|
||||
def isStringType(t):
|
||||
return isinstance(t, basestring)
|
||||
return isinstance(t, basestring) # noqa: F821
|
||||
|
||||
def isPath(f):
|
||||
return isinstance(f, basestring)
|
||||
return isinstance(f, basestring) # noqa: F821
|
||||
|
||||
|
||||
# Checks if an object is a string, and that it points to a directory.
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
# Master version for Pillow
|
||||
__version__ = '5.3.0'
|
||||
__version__ = '5.4.1'
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -51,7 +51,8 @@ features = {
|
|||
"webp_anim": ("PIL._webp", 'HAVE_WEBPANIM'),
|
||||
"webp_mux": ("PIL._webp", 'HAVE_WEBPMUX'),
|
||||
"transp_webp": ("PIL._webp", "HAVE_TRANSPARENCY"),
|
||||
"raqm": ("PIL._imagingft", "HAVE_RAQM")
|
||||
"raqm": ("PIL._imagingft", "HAVE_RAQM"),
|
||||
"libjpeg_turbo": ("PIL._imaging", "HAVE_LIBJPEGTURBO"),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Metadata-Version: 2.1
|
||||
Name: Pillow
|
||||
Version: 5.3.0
|
||||
Version: 5.4.1
|
||||
Summary: Python Imaging Library (Fork)
|
||||
Home-page: http://python-pillow.org
|
||||
Author: Alex Clark (Fork Author)
|
||||
|
|
@ -44,7 +44,7 @@ Pillow is the friendly PIL fork by `Alex Clark and Contributors <https://github.
|
|||
* - tests
|
||||
- |linux| |macos| |windows| |coverage|
|
||||
* - package
|
||||
- |zenodo| |version|
|
||||
- |zenodo| |tidelift| |version| |downloads|
|
||||
* - social
|
||||
- |gitter| |twitter|
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ Pillow is the friendly PIL fork by `Alex Clark and Contributors <https://github.
|
|||
:target: https://travis-ci.org/python-pillow/Pillow
|
||||
:alt: Travis CI build status (Linux)
|
||||
|
||||
.. |macos| image:: https://img.shields.io/travis/python-pillow/pillow-wheels/latest.svg?label=macOS%20build
|
||||
.. |macos| image:: https://img.shields.io/travis/python-pillow/pillow-wheels/master.svg?label=macOS%20build
|
||||
:target: https://travis-ci.org/python-pillow/pillow-wheels
|
||||
:alt: Travis CI build status (macOS)
|
||||
|
||||
|
|
@ -71,10 +71,17 @@ Pillow is the friendly PIL fork by `Alex Clark and Contributors <https://github.
|
|||
.. |zenodo| image:: https://zenodo.org/badge/17549/python-pillow/Pillow.svg
|
||||
:target: https://zenodo.org/badge/latestdoi/17549/python-pillow/Pillow
|
||||
|
||||
.. |tidelift| image:: https://tidelift.com/badges/github/python-pillow/Pillow?style=flat
|
||||
:target: https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=referral&utm_campaign=readme
|
||||
|
||||
.. |version| image:: https://img.shields.io/pypi/v/pillow.svg
|
||||
:target: https://pypi.org/project/Pillow/
|
||||
:alt: Latest PyPI version
|
||||
|
||||
.. |downloads| image:: https://img.shields.io/pypi/dm/pillow.svg
|
||||
:target: https://pypi.org/project/Pillow/
|
||||
:alt: Number of PyPI downloads
|
||||
|
||||
.. |gitter| image:: https://badges.gitter.im/python-pillow/Pillow.svg
|
||||
:target: https://gitter.im/python-pillow/Pillow?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
||||
:alt: Join the chat at https://gitter.im/python-pillow/Pillow
|
||||
|
|
@ -1,96 +1,96 @@
|
|||
PIL/.dylibs/libfreetype.6.dylib,sha256=m0qsMUKy3L2LJX3BJJs_L2KjRAxpeGhS4Xgevx1o8ww,1976728
|
||||
PIL/.dylibs/libjpeg.9.dylib,sha256=n0EEWqznQhoKFfA47FK_4TCFQqyPXXhCyKIrQI9VAdw,717696
|
||||
PIL/.dylibs/liblcms2.2.dylib,sha256=uTq3a5PFhkwlQNEAd_24Hzcnc_RSyOpTgxYsDSm3fUo,969452
|
||||
PIL/.dylibs/liblzma.5.dylib,sha256=sq2_eFD8IYIiBV_-PdBtFCbmL6RYxv32begwaw-_0Qg,479156
|
||||
PIL/.dylibs/libopenjp2.2.1.0.dylib,sha256=F-r6pjRJODyGvYIw1DU1S1hGmFZUOaLcSPpJYjWcu7I,671168
|
||||
PIL/.dylibs/libpng16.16.dylib,sha256=Jdp3OQ2M5iYG4bxmmhM7RQeR9i1nh1V3OsFT2VyFCBk,602204
|
||||
PIL/.dylibs/libtiff.5.dylib,sha256=TLpcU5Slh9YOzEPzDcxy1YaPSIaNPDhuPOUcEeLYDm8,1290132
|
||||
PIL/.dylibs/libwebp.7.dylib,sha256=8f9BNpbhzg-itZ39a3OnQcXJE-Q4KxhMTn74VKVvTZY,1384692
|
||||
PIL/.dylibs/libwebpdemux.2.dylib,sha256=ND8dpbn9-VJBPQtMKC9ZhgTR5fjh6NCk8DJMfOs8vBM,61000
|
||||
PIL/.dylibs/libwebpmux.3.dylib,sha256=NM8v8WHrT0eqMmgkhJsEqae4C270V00fEWmK26C7wms,124156
|
||||
PIL/.dylibs/libz.1.2.11.dylib,sha256=nXDg3A_3j-SJkNZ_rYFbAEEvU-PhOcggyoiMKN1hdC0,257796
|
||||
PIL/.dylibs/libfreetype.6.dylib,sha256=i6H_nNeeK4yAiU-LJUXbSFcHsSkM2v9JcuibaRJBCCc,1907184
|
||||
PIL/.dylibs/libjpeg.9.dylib,sha256=6efHfpjhZBi7BQzOK_h6pCqJmIuZBBrBUc1GhS13vU8,693128
|
||||
PIL/.dylibs/liblcms2.2.dylib,sha256=QzcRso5BByqtBMpir14PYLwfcLPk2_D7n908MFd9JlQ,940684
|
||||
PIL/.dylibs/liblzma.5.dylib,sha256=HCt7fM4P5IW_Yx2BwMrC6xATt8ezf0eHRA3W9XKF0cg,458756
|
||||
PIL/.dylibs/libopenjp2.2.1.0.dylib,sha256=mqTXoKqwca_Hts2ASMLBtWYhSLU0Z6y6sfH1sEs2xNw,642424
|
||||
PIL/.dylibs/libpng16.16.dylib,sha256=rQah6m8ks5WQ_YgncckNDvZ-QkagSHkBUNwb47STas0,573628
|
||||
PIL/.dylibs/libtiff.5.dylib,sha256=MHa_MEHWw0QFIfC7CxcKt_NanhYEsvQSwKe3Nh8rs9A,1266036
|
||||
PIL/.dylibs/libwebp.7.dylib,sha256=ZgtQVYWyMlOCT2GjFm1e852qYg8W1WUz2Pd75Dnja54,1514044
|
||||
PIL/.dylibs/libwebpdemux.2.dylib,sha256=kBfj2sYjFoIlr_HdxgUKFR4d9RaoUdzUYObRMF2iH3Q,60928
|
||||
PIL/.dylibs/libwebpmux.3.dylib,sha256=IEYe9r6vlJjOjESVhtWtLMJYYiFVDeEQSkP8p-TSws4,115284
|
||||
PIL/.dylibs/libz.1.2.11.dylib,sha256=hkasAHYGcsTfJGm6ujfLJYrN87nT3IYB07pI7L8G-kU,249516
|
||||
PIL/BdfFontFile.py,sha256=lap8i0-KXX9TGbBfFkyEm3YMONHAKoD3ilhtfwl8xXo,3000
|
||||
PIL/BlpImagePlugin.py,sha256=8Qia6DFeu-tZn1VYF591-IGXJJdvgIYoLBpniKD4pSY,14416
|
||||
PIL/BmpImagePlugin.py,sha256=ceYTIBt49JbRRD54BwunPLu7TVx5oBY51oOesJ0G_S8,14182
|
||||
PIL/BmpImagePlugin.py,sha256=Lch9bvBvs58AJlO1TRh8aLvYa1n8_WI2FnNXrlYI6Lw,14389
|
||||
PIL/BufrStubImagePlugin.py,sha256=gW5inS0a7X7HW2sv5a5r94P2v9nRVUSv2cdEgKo8VWI,1519
|
||||
PIL/ContainerIO.py,sha256=NjmpvNBDrF2zC4c60QzJU14YZ_H0ykzfeb_HJ0WH5po,2705
|
||||
PIL/CurImagePlugin.py,sha256=IiY3siY1L_BmGmsFd-EyoXDMur-PT15ZYE5achTqjls,1737
|
||||
PIL/DcxImagePlugin.py,sha256=H-pUUjreLV8pcigxXi76XSaGCsfjugZVRJpjt5yV9dE,2025
|
||||
PIL/DdsImagePlugin.py,sha256=r6kf4T5ZZ4kcJZyjN-np0ob_O6NYRqI1HLR5yat9M_c,5072
|
||||
PIL/EpsImagePlugin.py,sha256=lhPW82E2rLF6cjTnnIZhBoVpF-4YxX7yZhp63xMxXf4,12703
|
||||
PIL/DcxImagePlugin.py,sha256=ZgcVX2kP_-qtdojw1E86klmKXS8AORE9qPIPWZnvjgQ,2230
|
||||
PIL/DdsImagePlugin.py,sha256=7e1YcO2D644LABUdGYavovsKCuEI6f_VaIBicvx9CLg,5073
|
||||
PIL/EpsImagePlugin.py,sha256=uY-YMg-6C40VFmm7R3cQqpd8K8LRuQtuZCVB5CDDRHo,12675
|
||||
PIL/ExifTags.py,sha256=-Auwh-hnhpOuBCo6SW5hEmToJYmbjat13TTG4OnF9Q4,8837
|
||||
PIL/FitsStubImagePlugin.py,sha256=rbIznhaRU63PAFVjp_czCG0js9kw7Uq6PDJ4TuQY_3E,1623
|
||||
PIL/FliImagePlugin.py,sha256=tcSlB2OEEYJzVatMeKXuH09SnCzmo7KYMRzbPIWjDwg,4094
|
||||
PIL/FliImagePlugin.py,sha256=o3JKVvZ2Ie1XhW_SlrF36DT8JUq-tO0P_zskIk87RyM,4393
|
||||
PIL/FontFile.py,sha256=1PGL-w3Adrfda7ISCKkcgljCyU2D606gaNkG7wViAJM,2800
|
||||
PIL/FpxImagePlugin.py,sha256=4EGYtQiaNxPaNztFblW-ByxiB1kh5WaCD60Z1MM9VLk,6282
|
||||
PIL/FtexImagePlugin.py,sha256=roR39s4VKquA_eBUiKzKRjbF1dAsRcvjZfi-4JvW5OE,3296
|
||||
PIL/FtexImagePlugin.py,sha256=fNyhDBvIEtNyqs1LJSc4XDKL_S9tDf7Xe0yCsgeJvf4,3322
|
||||
PIL/GbrImagePlugin.py,sha256=gnf5QYRPqVSPGshEg78Q_Bls0muXYwiw7YZKNaqg_Xg,2754
|
||||
PIL/GdImageFile.py,sha256=Jdl6pgAz4FN5VoPiYzGSk5rp3MO6s5g3jvsiNH5TnOw,2289
|
||||
PIL/GifImagePlugin.py,sha256=jWrIDUQ2zdDL83Qdlz-QOStzJLgEpRxgoVpWVLs-HLM,26951
|
||||
PIL/GdImageFile.py,sha256=-NsoC3AD8-X4tbHUsTIVTRvJhHGmHR3fKDLJBg31ywE,2302
|
||||
PIL/GifImagePlugin.py,sha256=Vdc5HTi-lEKGpBdzz6eRiY9S3suHNGUJnICYnQ8XWH0,28065
|
||||
PIL/GimpGradientFile.py,sha256=zs7-vHAdVCInRQRDx2K5fBpofMlRR0GRKxGVmcUGMag,3345
|
||||
PIL/GimpPaletteFile.py,sha256=1o3b3WhPCeUHz_9uWforK0iQ_OBeGoFMHnEsn9lfCjM,1339
|
||||
PIL/GribStubImagePlugin.py,sha256=Ct8GRHzqlcD1uI093lsVirimGj8zSnJjs5QgBBGeFZA,1542
|
||||
PIL/Hdf5StubImagePlugin.py,sha256=7-DvTj34u1bRFGZOMsgtd7QadvhkbYgNzKSc2vx6PkM,1516
|
||||
PIL/IcnsImagePlugin.py,sha256=0hCj4hGo0PV_uKUrTypgAdMpcj3YxD19xA-0k13oKXM,11760
|
||||
PIL/IcnsImagePlugin.py,sha256=btEV-lOOXNJtDg-BzQfGiiGDrnJ7Guznsqgo92fDz9U,11843
|
||||
PIL/IcoImagePlugin.py,sha256=8jC_B4NCUbb8cHwROU1G-nw2HFm-iAA7-rREpr5sErY,9609
|
||||
PIL/ImImagePlugin.py,sha256=pa2qqJMeh0doO2KtP-8Fm3gCqfAFR2lcEIE00Ww26Pc,10163
|
||||
PIL/Image.py,sha256=p8elay6s1tMhPXAr_offKpBnXRtpb2t9K4TH9zLysuI,98243
|
||||
PIL/ImageChops.py,sha256=f07JlSm9Ln3-PPIM1-ylbchp29FSnOPunFyciLZyMyc,6182
|
||||
PIL/ImageCms.py,sha256=awGhfurjYYz4QjpXItmrNAgmWCMMK9kk7tcThRs_DNw,36004
|
||||
PIL/ImageColor.py,sha256=ctBZpa78H8kqxM8kqpT12c0tw0D812YWy-KtRl-mupA,8703
|
||||
PIL/ImageDraw.py,sha256=4_8Eu55HHwIWRJtBG4HOq3MW0akl18ZKmpL9soCwFCA,16527
|
||||
PIL/ImImagePlugin.py,sha256=AydQxO41R62iTdlhL7oVds9Y9arypiSDumi82nj55HQ,10363
|
||||
PIL/Image.py,sha256=vHAEnG_FUhBmA3x5QtIdVxmrTzz5e8U8YwzY_qQ_PzA,99313
|
||||
PIL/ImageChops.py,sha256=N7-3nfosVcIgffGirCSCZwWg0SWgwh8MdsKDpfvMch8,6782
|
||||
PIL/ImageCms.py,sha256=RdX7yBfI7-WMVzcLPr9n5r91kpRjP9Z_j_kXQZlUeuQ,36022
|
||||
PIL/ImageColor.py,sha256=E8yGQhftPb4ab02SOvkp6rQizFTxsKtsTVKp-t6ocbs,8749
|
||||
PIL/ImageDraw.py,sha256=MjmW8iH8TvUFIKqKHlhKr_q-rLOvCbSryCnNkNBXJg0,16535
|
||||
PIL/ImageDraw2.py,sha256=kpFXgNEmf2Yn16zy9TpU4_z7ekN5sEhlKmmTXwnC3eg,3127
|
||||
PIL/ImageEnhance.py,sha256=wDIaAs_zjcE86416xlCCW6WmxbI1ua6iOjYOwm1-tkE,3208
|
||||
PIL/ImageFile.py,sha256=XvlagL2cyYxhIrIh5Q0567aPdMiAgkt8XhXD1_V_pUc,20762
|
||||
PIL/ImageFilter.py,sha256=xoYoRkuBg1rfRXvejKrXk6tjmeQKzQHyFX7EoBQoPzM,15352
|
||||
PIL/ImageFont.py,sha256=KJH_PYreWNsNvsRVkPRkVEhhVHMVOee7JdMLv5nYgM4,21556
|
||||
PIL/ImageGrab.py,sha256=q7wTv2h-t6-2KqKKVIhLg3lNTTAhlo45bErT368pGz8,2150
|
||||
PIL/ImageFile.py,sha256=y_EuBj3SMAjrBI2qenQzBR5LswWnRZS3piAoBLE7E2g,20823
|
||||
PIL/ImageFilter.py,sha256=tXBIi8BazNT-jXY83wMdyI74y2c3RBixZ_SXQm3rjpQ,15364
|
||||
PIL/ImageFont.py,sha256=LZj29r2xuKUvt_q_3y4Gi_krDXLCxzF7Z-g2RA_BOu0,21539
|
||||
PIL/ImageGrab.py,sha256=SrN9aiKf_0hfeGlJ4dKNQkMDZD48mCFl5WC75Asjjsg,2166
|
||||
PIL/ImageMath.py,sha256=k3KvcxS5Vm07IWVnZqq0Fx8ceVB1MdsBlYHoLYrpDys,7463
|
||||
PIL/ImageMode.py,sha256=7FRP65DI8LZejbFWUtefXn4b5ZnQinvlYwAbeP6SPBk,1597
|
||||
PIL/ImageMorph.py,sha256=MrDftUNiY7lSGDu5AGdrOpZsne3x9pFeiddg_KtpFyE,8271
|
||||
PIL/ImageOps.py,sha256=50pdkq8mF6sO3twh8Gm_qr7TxidhEeVc9ul1wMSRZhw,20228
|
||||
PIL/ImageOps.py,sha256=9pMDh8GRg5gC-T3IybKcmC93R4-L7WSdh0WYhFQ9dak,19804
|
||||
PIL/ImagePalette.py,sha256=IDL9FgTwlBSfUdo_8BSpS9nHYGFrcNzgqJYqdA4Kyys,6319
|
||||
PIL/ImagePath.py,sha256=IPUmk_1SdD5NjpZWuwDEDMrRIq_izWrhiczq7zFgLl8,337
|
||||
PIL/ImageQt.py,sha256=CZtLL_Uh4EUaeclr-w3Iq7y2wIvRqGHkwQDB1oByyts,6544
|
||||
PIL/ImageQt.py,sha256=mWDbFt2WdBVUHJQtbXyff_Ea_6_sBiwA5Ht-kneXtFc,6558
|
||||
PIL/ImageSequence.py,sha256=fp7ziB8L6zhEXz8bTrU5sYCdGnZ7OzADEOsvCd37Vc4,1240
|
||||
PIL/ImageShow.py,sha256=tH6tIj8jh__hOeAUpnRDgSiU15kfhaOaoc8cREe5OTU,5262
|
||||
PIL/ImageShow.py,sha256=DCHHjLnnsJ3mUUOR-bR7POL2pku5DDsUIsOtlijZis4,6237
|
||||
PIL/ImageStat.py,sha256=NuQM-hCjP_TlAbj6jr5LC4S35QpdwmMKsate-UEqYNE,3854
|
||||
PIL/ImageTk.py,sha256=pVeub1amZXiuZzjUKqRAplbeu2yI0U7kfpITZ9Cz8vw,9420
|
||||
PIL/ImageTk.py,sha256=_c762TFCB54pHwdbjbx-7aYAH79o15E7s_eTfRNwEkQ,9440
|
||||
PIL/ImageTransform.py,sha256=3tSnRn747qaNC-8BaOC0T1CyeMJoaKUzpLEwCPKyHFs,2839
|
||||
PIL/ImageWin.py,sha256=cH6bBrWyk42copvCfPILYhpTkdngxA1d8v1S7R9ol-Y,7217
|
||||
PIL/ImtImagePlugin.py,sha256=PHIOn60naWLAV9FyUja2zggiNu7sIivpMntF-IczeII,2242
|
||||
PIL/IptcImagePlugin.py,sha256=A3vo8uSxwbUi2kVzaEB-WVRnts8SmpJ0fRd2W_QDUys,6757
|
||||
PIL/Jpeg2KImagePlugin.py,sha256=rVcCQ9LS9eabzUKNmrbBs6YGs75-aNKaY88ETvHE9lk,7760
|
||||
PIL/JpegImagePlugin.py,sha256=cQNKq_v8K3-P7Dssuehyf56kmGiAkMWgb7WSCc-shpo,27663
|
||||
PIL/JpegPresets.py,sha256=t9_TuyTIVp9RkXlIv3BVLEh7T1NZtVZwzzLpIlcJiMQ,12399
|
||||
PIL/Jpeg2KImagePlugin.py,sha256=peDeiX1OJ6lVmzq4JVddARssJw1RnNVaubu02TgL9zo,8073
|
||||
PIL/JpegImagePlugin.py,sha256=QpbIrduTKsClVEcvZdRmWByLAndZYFk-hG5wUV8TXO0,27717
|
||||
PIL/JpegPresets.py,sha256=eA89Gs-xD8uKIqf2TZM5Nu2hhlVgW5jlIC1ffGEPiYM,12413
|
||||
PIL/McIdasImagePlugin.py,sha256=rajcN6-9PrYJ9Ex--MDbgwqXDhSFJdsKhXOCA1pwbx4,1769
|
||||
PIL/MicImagePlugin.py,sha256=X0tFPFlbaHeY4tI70AmzViUs781-u-ycrqHM7Hb9oKk,2460
|
||||
PIL/MicImagePlugin.py,sha256=42FaItO7ABjEkE38Mujqo_0rXPr9CTdwcmgxjc8DzBU,2664
|
||||
PIL/MpegImagePlugin.py,sha256=AJjo-gDBT2ok2foejHRaXvO5u416JM9DvCdr9eSaF9k,1832
|
||||
PIL/MpoImagePlugin.py,sha256=gD6xTKauVCGIsK_Sey8Nh-VYyfthO4ysBsMbwmnyo68,2982
|
||||
PIL/MpoImagePlugin.py,sha256=r3nr3ga_nO188eMnMTtReDhSQ20OaLm23ueUNsABxlg,3187
|
||||
PIL/MspImagePlugin.py,sha256=JpWpCwm6BIPWOtr8_HjSMZ4YKDbXWwGLMS1LixczacU,5534
|
||||
PIL/OleFileIO.py,sha256=EJ54RgQCUPoQjO0lDdoe34MeOd9IH_RwYH2GKpKYlPY,152
|
||||
PIL/PSDraw.py,sha256=hQuLYYkxbTOL6fw4eomK_Rop0U0JWZIlljBwtpj_jes,6870
|
||||
PIL/PaletteFile.py,sha256=xnAUCKhUxSIeqqn--4DFPRaNtVxeqoNvYgdzq_7kidQ,1110
|
||||
PIL/PalmImagePlugin.py,sha256=-4otkAWd40ykwzLq06CZ8QWb_bFZO_cLirtZ_ZeP-7s,9150
|
||||
PIL/PalmImagePlugin.py,sha256=MDYPq2BG46hYCyKGvAZ4nmUlPDqGlS104h05PNxpiYo,9164
|
||||
PIL/PcdImagePlugin.py,sha256=VR0iEJ0UcdM4s2pVIILruv4R5irGZAlO5SZOT-EF3bw,1521
|
||||
PIL/PcfFontFile.py,sha256=BdhMHBLk_DMvnO6IAe_IdddpHwZRjXPEzTeh2oglylQ,6136
|
||||
PIL/PcfFontFile.py,sha256=-f7EGvz-jooZA6g9q1BOPhjsVqeN4SJ2rqya3_-ZEnQ,6137
|
||||
PIL/PcxImagePlugin.py,sha256=1Wr5XjlpE8jipIehuk_kzHa8IUE_DoaI8Qew1MZT5ww,5225
|
||||
PIL/PdfImagePlugin.py,sha256=KiMtzTobyiCORJ-3uZafp3nGzjDTvcUXP-PCweD0BiM,8292
|
||||
PIL/PdfParser.py,sha256=kTxFoLgJn1BDdbVLc3RZ3KDWjl-bBeVBOVz9s5ImsoU,35812
|
||||
PIL/PdfParser.py,sha256=VdSHQRhtIY55cocaGH9cDEA9yodwG-bpdjJ28Wc2eCI,35839
|
||||
PIL/PixarImagePlugin.py,sha256=OVn1aHCti2cVAtTUnU2x3yj8KvP9NFgaNjc80ou3yvE,1675
|
||||
PIL/PngImagePlugin.py,sha256=frkMBRVKCvrXc0IftFKa4XbAEzZJ7mueM-St6pKjqwk,25691
|
||||
PIL/PngImagePlugin.py,sha256=EbKeOcvEUmM2L2Ae-CMDKHhWZBiIqlso_KgCemz4eBo,26998
|
||||
PIL/PpmImagePlugin.py,sha256=a5zogM8UsfC4P1FWiz6843uJwDJi59n3MZLhGfVdKQs,4242
|
||||
PIL/PsdImagePlugin.py,sha256=IPKR3UrgDrC09OgkVQDUXCcPFTYOr4D7SRag5o1qGCU,7551
|
||||
PIL/PyAccess.py,sha256=rIH60zn4NcjZmlMp5sZowFTWLjzUqvooECNZa87u9WQ,8895
|
||||
PIL/PsdImagePlugin.py,sha256=QZJIdtoFPfJNQcd_dxYbK4Ve60r4w5s4cOAkBqyYKW8,7383
|
||||
PIL/PyAccess.py,sha256=s4VQKQt5r2Ksn-YbGIi4ttaabT_lmxNgWRseZ6yz5S8,9455
|
||||
PIL/SgiImagePlugin.py,sha256=4dK6KwaZ1nQdfCQwtWl3nqE78ZPAnEvJa574CA5YjWU,6152
|
||||
PIL/SpiderImagePlugin.py,sha256=RNi5iNkfbWi-FbgkbFRA5ETOnH-kw8WX1LjiWKXYsUw,9264
|
||||
PIL/SpiderImagePlugin.py,sha256=d30x_32JTabIDO7t0e88s97gI2UMdtSEbNjdcL6cs9g,9479
|
||||
PIL/SunImagePlugin.py,sha256=1oYBM86mhI9vpPCy6_yH5nITzjcOieituTjcaZoVwwk,4367
|
||||
PIL/TarIO.py,sha256=0f0geSoJ9B0PPcM0jMcCCfa94hwYDS6hth7FRNFwmpM,1239
|
||||
PIL/TarIO.py,sha256=meof-14bhWlVxG1HHAwHfOt-MTRPZVkaNYUwMDjmpvU,1539
|
||||
PIL/TgaImagePlugin.py,sha256=mAMySZWVZuVxfssW-dSGqtszVl8rbDa-z4Z5GR9TXpE,5992
|
||||
PIL/TiffImagePlugin.py,sha256=C0Sc9lPJft-2QUuP4lCd1HsQbbnYnl8_wDAXSAxLJdw,64902
|
||||
PIL/TiffTags.py,sha256=B4ygNlSv1p1k9bvqtn4KXqrBoZQK7Jl-M79ONrGcI4g,14471
|
||||
PIL/TiffImagePlugin.py,sha256=QKRfBKkmF5PPYeZWP3IBc6PvyzsHrwMt7P7959eK_7g,66102
|
||||
PIL/TiffTags.py,sha256=JSd57jE9DNGzBsHbzGqVqh0Wc8WjiJ8eWSF7UHfdEoI,14779
|
||||
PIL/WalImageFile.py,sha256=rKggtH36cF0a7NaiwrxfWS1Lq2zSoI9bJfGvW5LIax8,5558
|
||||
PIL/WebPImagePlugin.py,sha256=ri2gzIeXRC8gmdG81pFvnIssR97I6FA0IgnAl7cCpCM,10413
|
||||
PIL/WebPImagePlugin.py,sha256=OSa_fVq73YLgF_K6i9JFAgl81rT5F9kYS9Ll_zL4_7U,10967
|
||||
PIL/WmfImagePlugin.py,sha256=MjVxOj6cx-qcSSJq-ejIj-x1_vUhp9ien3Dis2-E2ek,4237
|
||||
PIL/XVThumbImagePlugin.py,sha256=bnw1cJ_Dn3fpbEIW-N5-jKX4zbm3u7PTl6sEZp7AmTM,1960
|
||||
PIL/XbmImagePlugin.py,sha256=nENR_AnYDIvPIYvC4BAQPbK3VmFwz8oUVE6xap39wso,2505
|
||||
|
|
@ -189,21 +189,21 @@ PIL/__pycache__/_util.cpython-37.pyc,,
|
|||
PIL/__pycache__/_version.cpython-37.pyc,,
|
||||
PIL/__pycache__/features.cpython-37.pyc,,
|
||||
PIL/_binary.py,sha256=Wy_0dJYiAzbkg7rKBi2e9os-UsPqcgPFMaGUW1x7vNE,1822
|
||||
PIL/_imaging.cpython-37m-darwin.so,sha256=D-V4QdAkd201gklGmrvYw9DFH4JCi0xDlgFJ20niNLY,894544
|
||||
PIL/_imagingcms.cpython-37m-darwin.so,sha256=tuQ6bntQ6tFug6EW-wrglR0mRRzR1oUnTWeXSvsCw40,85964
|
||||
PIL/_imagingft.cpython-37m-darwin.so,sha256=Lg9jZhVWnNifQpeFSebxAcPMhdAS6PJuWEyCBtXuqYI,51400
|
||||
PIL/_imagingmath.cpython-37m-darwin.so,sha256=TpPBPlwhZtEBvBGUkAJH1HHx2s9cmMeaK5xdpRTuvr4,67388
|
||||
PIL/_imagingmorph.cpython-37m-darwin.so,sha256=lnnM_HmMn9Q-N_jnkzs_l5zOr9oAgdeK2QZCPoju3ic,26452
|
||||
PIL/_imagingtk.cpython-37m-darwin.so,sha256=cdWduXaWAcWtQ2oey7r9R2kg5AvhJJ-oGDHoJG3PoWE,36496
|
||||
PIL/_imaging.cpython-37m-darwin.so,sha256=jK5dnIxrG-5f4HFJpmZn__6r8ivZm0qiZnM2kVmgQ-c,972876
|
||||
PIL/_imagingcms.cpython-37m-darwin.so,sha256=e6E3aYwH9XPP_nysYIP7to2NKl1aCJeSwnTgYI9yRsA,90092
|
||||
PIL/_imagingft.cpython-37m-darwin.so,sha256=UJuSXA4GGPWWKTKFTSTvEYFfhk5XCCR5gV60-jD5iqw,51400
|
||||
PIL/_imagingmath.cpython-37m-darwin.so,sha256=Wy3NXbbNLX217Ained6q3ZjqsAIoSro_NNXxrF_2z7w,63292
|
||||
PIL/_imagingmorph.cpython-37m-darwin.so,sha256=auErF1oFgVuiDjce6-tjk55eqyneaUyfIY8gZFlvJVY,26452
|
||||
PIL/_imagingtk.cpython-37m-darwin.so,sha256=2MijYdRI3Jiapu-eNi3JwzI-vfk6W6JhHSNWt1ju8oc,32400
|
||||
PIL/_tkinter_finder.py,sha256=OxAeW-nXH-BLvlWO-YjwMtaTG33_UQ5kmR3IbtyMAH8,702
|
||||
PIL/_util.py,sha256=zYI94v_4bOptVC8oOkYdl844rW8TfODA6xlZD_rdeq0,590
|
||||
PIL/_version.py,sha256=pv_VXLvUR152CKmoMC7gd7j49lg8NIuBjTwHHrFVzus,50
|
||||
PIL/_webp.cpython-37m-darwin.so,sha256=sMtz9dihZedcA_g_mqSUEncDtd0QuxtZ0B5XyOL4XYg,49784
|
||||
PIL/features.py,sha256=9D3LoufNcZvNvp8ExVAqdequM0vD1LF_puH_byd3h38,1874
|
||||
Pillow-5.3.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
Pillow-5.3.0.dist-info/LICENSE.txt,sha256=SWD8GL7MKGvoOcj_F71wzVIiUz92ESkUIVNENxiiUZk,1452
|
||||
Pillow-5.3.0.dist-info/METADATA,sha256=MC3MnWhnq4PM62HVLgSfN4_s5Xgmzb7QSItmFgNJcTU,4109
|
||||
Pillow-5.3.0.dist-info/RECORD,,
|
||||
Pillow-5.3.0.dist-info/WHEEL,sha256=VUgiLi0_ag0bBLL7DPKGck7Ptb2qpMkh_t8-WZdf87Y,249
|
||||
Pillow-5.3.0.dist-info/top_level.txt,sha256=riZqrk-hyZqh5f1Z0Zwii3dKfxEsByhu9cU9IODF-NY,4
|
||||
Pillow-5.3.0.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
||||
PIL/_util.py,sha256=5g9VCPUSCSmKn393M-fPOUvD3R5qylJkrsXvQIE0IMM,618
|
||||
PIL/_version.py,sha256=AuVB3gVxoARzJdze1OFOMfXyqfAayRyeILycPK0rZMs,50
|
||||
PIL/_webp.cpython-37m-darwin.so,sha256=0imhydRwtah175FoMsMYkYkr66isd0d_oiLdokjDe4E,45688
|
||||
PIL/features.py,sha256=0gdrWEVbv7oHwSslKN1mxeQcYuhLiJd7MH7CNj3Fn1E,1935
|
||||
Pillow-5.4.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
Pillow-5.4.1.dist-info/LICENSE,sha256=SWD8GL7MKGvoOcj_F71wzVIiUz92ESkUIVNENxiiUZk,1452
|
||||
Pillow-5.4.1.dist-info/METADATA,sha256=sVtaHZICKnq2IVCy5HxFQaw6MtD5v__ZdLt1kqHPTX0,4492
|
||||
Pillow-5.4.1.dist-info/RECORD,,
|
||||
Pillow-5.4.1.dist-info/WHEEL,sha256=dZ-5_wi424-cXKWlBPHfX3GR9ygTGUuzMFZB3m3t2_w,249
|
||||
Pillow-5.4.1.dist-info/top_level.txt,sha256=riZqrk-hyZqh5f1Z0Zwii3dKfxEsByhu9cU9IODF-NY,4
|
||||
Pillow-5.4.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.31.1)
|
||||
Generator: bdist_wheel (0.32.3)
|
||||
Root-Is-Purelib: false
|
||||
Tag: cp37-cp37m-macosx_10_6_intel
|
||||
Tag: cp37-cp37m-macosx_10_9_intel
|
||||
Binary file not shown.
|
|
@ -0,0 +1,29 @@
|
|||
lxml is copyright Infrae and distributed under the BSD license (see
|
||||
doc/licenses/BSD.txt), with the following exceptions:
|
||||
|
||||
Some code, such a selftest.py, selftest2.py and
|
||||
src/lxml/_elementpath.py are derived from ElementTree and
|
||||
cElementTree. See doc/licenses/elementtree.txt for the license text.
|
||||
|
||||
lxml.cssselect and lxml.html are copyright Ian Bicking and distributed
|
||||
under the BSD license (see doc/licenses/BSD.txt).
|
||||
|
||||
test.py, the test-runner script, is GPL and copyright Shuttleworth
|
||||
Foundation. See doc/licenses/GPL.txt. It is believed the unchanged
|
||||
inclusion of test.py to run the unit test suite falls under the
|
||||
"aggregation" clause of the GPL and thus does not affect the license
|
||||
of the rest of the package.
|
||||
|
||||
The isoschematron implementation uses several XSL and RelaxNG resources:
|
||||
* The (XML syntax) RelaxNG schema for schematron, copyright International
|
||||
Organization for Standardization (see
|
||||
src/lxml/isoschematron/resources/rng/iso-schematron.rng for the license
|
||||
text)
|
||||
* The skeleton iso-schematron-xlt1 pure-xslt schematron implementation
|
||||
xsl stylesheets, copyright Rick Jelliffe and Academia Sinica Computing
|
||||
Center, Taiwan (see the xsl files here for the license text:
|
||||
src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/)
|
||||
* The xsd/rng schema schematron extraction xsl transformations are unlicensed
|
||||
and copyright the respective authors as noted (see
|
||||
src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl and
|
||||
src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl)
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
Metadata-Version: 2.1
|
||||
Name: lxml
|
||||
Version: 4.2.5
|
||||
Version: 4.3.0
|
||||
Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.
|
||||
Home-page: http://lxml.de/
|
||||
Author: lxml dev team
|
||||
|
|
@ -15,10 +15,8 @@ Classifier: Intended Audience :: Information Technology
|
|||
Classifier: License :: OSI Approved :: BSD License
|
||||
Classifier: Programming Language :: Cython
|
||||
Classifier: Programming Language :: Python :: 2
|
||||
Classifier: Programming Language :: Python :: 2.6
|
||||
Classifier: Programming Language :: Python :: 2.7
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.3
|
||||
Classifier: Programming Language :: Python :: 3.4
|
||||
Classifier: Programming Language :: Python :: 3.5
|
||||
Classifier: Programming Language :: Python :: 3.6
|
||||
|
|
@ -29,17 +27,13 @@ Classifier: Topic :: Text Processing :: Markup :: HTML
|
|||
Classifier: Topic :: Text Processing :: Markup :: XML
|
||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
||||
Provides-Extra: cssselect
|
||||
Provides-Extra: htmlsoup
|
||||
Provides-Extra: source
|
||||
Requires-Dist: cssselect (>=0.7) ; extra == 'cssselect'
|
||||
Provides-Extra: html5
|
||||
Provides-Extra: cssselect
|
||||
Requires-Dist: cssselect (>=0.7); extra == 'cssselect'
|
||||
Provides-Extra: html5
|
||||
Requires-Dist: html5lib; extra == 'html5'
|
||||
Requires-Dist: html5lib ; extra == 'html5'
|
||||
Provides-Extra: htmlsoup
|
||||
Requires-Dist: BeautifulSoup4; extra == 'htmlsoup'
|
||||
Requires-Dist: BeautifulSoup4 ; extra == 'htmlsoup'
|
||||
Provides-Extra: source
|
||||
Requires-Dist: Cython (>=0.26.1); extra == 'source'
|
||||
Requires-Dist: Cython (>=0.29.1) ; extra == 'source'
|
||||
|
||||
lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It
|
||||
provides safe and convenient access to these libraries using the ElementTree
|
||||
|
|
@ -64,21 +58,38 @@ an appropriate version of Cython installed.
|
|||
|
||||
After an official release of a new stable series, bug fixes may become
|
||||
available at
|
||||
https://github.com/lxml/lxml/tree/lxml-4.2 .
|
||||
Running ``easy_install lxml==4.2bugfix`` will install
|
||||
https://github.com/lxml/lxml/tree/lxml-4.3 .
|
||||
Running ``easy_install lxml==4.3bugfix`` will install
|
||||
the unreleased branch state from
|
||||
https://github.com/lxml/lxml/tarball/lxml-4.2#egg=lxml-4.2bugfix
|
||||
https://github.com/lxml/lxml/tarball/lxml-4.3#egg=lxml-4.3bugfix
|
||||
as soon as a maintenance branch has been established. Note that this
|
||||
requires Cython to be installed at an appropriate version for the build.
|
||||
|
||||
4.2.5 (2018-09-09)
|
||||
4.3.0 (2019-01-04)
|
||||
==================
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
Features added
|
||||
--------------
|
||||
|
||||
* Javascript URLs that used URL escaping were not removed by the HTML cleaner.
|
||||
Security problem found by Omar Eissa.
|
||||
* The module ``lxml.sax`` is compiled using Cython in order to speed it up.
|
||||
|
||||
* GH#267: ``lxml.sax.ElementTreeProducer`` now preserves the namespace prefixes.
|
||||
If two prefixes point to the same URI, the first prefix in alphabetical order
|
||||
is used. Patch by Lennart Regebro.
|
||||
|
||||
* Updated ISO-Schematron implementation to 2013 version (now MIT licensed)
|
||||
and the corresponding schema to the 2016 version (with optional "properties").
|
||||
|
||||
Other changes
|
||||
-------------
|
||||
|
||||
* GH#270, GH#271: Support for Python 2.6 and 3.3 was removed.
|
||||
Patch by hugovk.
|
||||
|
||||
* The minimum dependency versions were raised to libxml2 2.9.2 and libxslt 1.1.27,
|
||||
which were released in 2014 and 2012 respectively.
|
||||
|
||||
* Built with Cython 0.29.2.
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
lxml-4.2.5.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
lxml-4.2.5.dist-info/METADATA,sha256=K9LGtfui5hNpzhVmxz33gNd4bDaPC9n3wywI68WV_bA,3143
|
||||
lxml-4.2.5.dist-info/RECORD,,
|
||||
lxml-4.2.5.dist-info/WHEEL,sha256=VUgiLi0_ag0bBLL7DPKGck7Ptb2qpMkh_t8-WZdf87Y,249
|
||||
lxml-4.2.5.dist-info/top_level.txt,sha256=NjD988wqaKq512nshNdLt-uDxsjkp4Bh51m6N-dhUrk,5
|
||||
lxml-4.3.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
lxml-4.3.0.dist-info/LICENSES.txt,sha256=QdSd1AaqDhVIptXyGjDWv2OLPNlutyid00jYPtLkA5I,1514
|
||||
lxml-4.3.0.dist-info/METADATA,sha256=xL8_WXsFYJ5khevrMu0IjlhWxzgCBpa2ungUZfuPsF8,3550
|
||||
lxml-4.3.0.dist-info/RECORD,,
|
||||
lxml-4.3.0.dist-info/WHEEL,sha256=dZ-5_wi424-cXKWlBPHfX3GR9ygTGUuzMFZB3m3t2_w,249
|
||||
lxml-4.3.0.dist-info/top_level.txt,sha256=NjD988wqaKq512nshNdLt-uDxsjkp4Bh51m6N-dhUrk,5
|
||||
lxml/ElementInclude.py,sha256=Imj9ors3Rz5yoAoOB7J792WzIrM1AiAtepMV0FCaBnk,7668
|
||||
lxml/__init__.py,sha256=lYLRn8M0_xdnN2bhEnZ2L7mlY5zM3gwz1kgLILLxC34,551
|
||||
lxml/__pycache__/ElementInclude.cpython-37.pyc,,
|
||||
|
|
@ -14,17 +15,17 @@ lxml/__pycache__/doctestcompare.cpython-37.pyc,,
|
|||
lxml/__pycache__/pyclasslookup.cpython-37.pyc,,
|
||||
lxml/__pycache__/sax.cpython-37.pyc,,
|
||||
lxml/__pycache__/usedoctest.cpython-37.pyc,,
|
||||
lxml/_elementpath.cpython-37m-darwin.so,sha256=2h5tnZ0K3ZpjrGufJMYUJ_SXL5BTlfffnROFhf7UPSs,434936
|
||||
lxml/_elementpath.py,sha256=RkBTByehAB4cEC6OSB9wkn5b2dBNiVzvYT_YBbJ4_gk,10121
|
||||
lxml/builder.cpython-37m-darwin.so,sha256=6lR4nvzpAPWRn1IBzp1jKB9wXLA0f2_0hAgv2jJigEc,206612
|
||||
lxml/builder.py,sha256=EbL_AVkQ3QUZBC9yTQQISAMJnZFVHVKoWcMroqlDRfw,7907
|
||||
lxml/_elementpath.cpython-37m-darwin.so,sha256=eaK6beoRI3XMrG4FVofOHg1LmPBgU6HVH_LX33FGUXc,446808
|
||||
lxml/_elementpath.py,sha256=Hq7zWPwh53ynnKO1US9-Q8NWEK0aXBd7siIeMoNN6Os,10189
|
||||
lxml/builder.cpython-37m-darwin.so,sha256=5tn035njP7Oxh-STnbJd9ZzA9Ujp6AWKm9acngohetU,218484
|
||||
lxml/builder.py,sha256=R5WsHI0bCOHYehskKXENvBkuarviL5rNJsmnh6cZGUA,7975
|
||||
lxml/cssselect.py,sha256=ADTqox2BUhZI_28K26Dnd-rPqvwL1A7KpXwDetXZLfA,3366
|
||||
lxml/doctestcompare.py,sha256=c1_02F7p5KE9epBcOJD0OA81v7ANrDyEr2P6A2irB5A,18387
|
||||
lxml/etree.cpython-37m-darwin.so,sha256=tik18T49adSYy_0CxKArsoLLDK3dWF_Kx6Wa2orhe6I,11788796
|
||||
lxml/etree.h,sha256=tVxNPlBEYitAxLTZi89zq_kT6T2__8DNeT7sD0kzO-U,8554
|
||||
lxml/etree_api.h,sha256=ITHOKhwTX8p7ceIuMdOIm68bdL0xS_u2wfmPswRfwu4,17831
|
||||
lxml/doctestcompare.py,sha256=dAjqNzMGJuDsxY0xOXwOWzEsq7gSfQf-6uuxZZwaNXM,18339
|
||||
lxml/etree.cpython-37m-darwin.so,sha256=qPVUqkQGubFy64g9vknR5ZW1lQfzEd-gnA0OEdsV_Z0,11815816
|
||||
lxml/etree.h,sha256=TWrERq5QkJNhXNpaJ78yssgHB1B0FDvH6gdMOxvb6vE,8554
|
||||
lxml/etree_api.h,sha256=uJFOvNEC6UeeWsw2aeeIl9Inp4eBPZSibZrZ92_DLfQ,17466
|
||||
lxml/html/ElementSoup.py,sha256=9NQNksJmEr0M2DqzaKhXWdALLo0btwVwjgTHnkfGfvk,319
|
||||
lxml/html/__init__.py,sha256=Zgx7NUBLlVN1wBlmHi83ScQu2_HJK78QU6-M2MmbC0Q,64889
|
||||
lxml/html/__init__.py,sha256=QtfpGNkR5fMkA1k5bh0RomQGceoyB3atRxiPxy-bkCw,64805
|
||||
lxml/html/__pycache__/ElementSoup.cpython-37.pyc,,
|
||||
lxml/html/__pycache__/__init__.cpython-37.pyc,,
|
||||
lxml/html/__pycache__/_diffcommand.cpython-37.pyc,,
|
||||
|
|
@ -40,13 +41,13 @@ lxml/html/__pycache__/soupparser.cpython-37.pyc,,
|
|||
lxml/html/__pycache__/usedoctest.cpython-37.pyc,,
|
||||
lxml/html/_diffcommand.py,sha256=aqbvEjiYe9WdfnQp62Ecv8MNwS3utErHwER-AsmNAYA,2135
|
||||
lxml/html/_html5builder.py,sha256=cASxN0Tks3_vqCA_sXa1oCx_McyRL6VpuRLA1T-B58o,3246
|
||||
lxml/html/_setmixin.py,sha256=Rt1Pb_GFWp_5BD5GioZBaUPUZbVwPruDPJJMR7O7ntE,1111
|
||||
lxml/html/_setmixin.py,sha256=uVCgBUC4SJ7N9GotmlKHrhH7R4Kk7wGU3u1WmEJKGeM,1184
|
||||
lxml/html/builder.py,sha256=1NuLqKPSaat75wCGufVuv1jIeBLuQCWsJVA_T2XjjUI,4310
|
||||
lxml/html/clean.cpython-37m-darwin.so,sha256=4dkAl775mcBYgWgmVX7rI3qK24xfQR4r_hBNZe46fGU,600996
|
||||
lxml/html/clean.py,sha256=lMwK9oOo8V9K3i-AMnKXkbbczPniDNm3vrgLFaTw9Ds,26427
|
||||
lxml/html/clean.cpython-37m-darwin.so,sha256=eNJm_sjmuOG7TQyDglHMf08EafHAGBd7KnbKaPJcZtI,644540
|
||||
lxml/html/clean.py,sha256=7LoNhrkhE25j3wgjEVBgONk38TlIwUlaj44B0wVX-24,26422
|
||||
lxml/html/defs.py,sha256=wrXnX7XKZJNNUlX4upOnTVxVeb8uYW3ufFHaHAWdEJY,4173
|
||||
lxml/html/diff.cpython-37m-darwin.so,sha256=KRubg3X4lcDGDgcmm4WE0uejD8kIwRMXnRGd7t66sc8,791292
|
||||
lxml/html/diff.py,sha256=yI8SDylLrEVgwvi0tScxXtWp18OAZZx4Pmi7XdXYxyI,30501
|
||||
lxml/html/diff.cpython-37m-darwin.so,sha256=4Jho_bWx3wuRoEna2Xsap7L-veXQZUdbh0JIBBX1itM,866532
|
||||
lxml/html/diff.py,sha256=F1A1vYO3dQdYfGDkI46zj5GN6UzaGMQt7ezqV5i324Q,30553
|
||||
lxml/html/formfill.py,sha256=9lnv7BnrQS0HOBY8ToeP1408xMN1wnltpsY-0CTGBpQ,9689
|
||||
lxml/html/html5parser.py,sha256=dnyC4cqHxywjZSzk0mu2L7THTZjxhg4yF4pncjusa_w,8634
|
||||
lxml/html/soupparser.py,sha256=tfdraMayPbMBCd2kGxUoTvNkhKUclfP3LmV9R85WKI4,10203
|
||||
|
|
@ -57,7 +58,7 @@ lxml/includes/__pycache__/__init__.cpython-37.pyc,,
|
|||
lxml/includes/c14n.pxd,sha256=pGf910mVH9IdBb7r_aE-J59axIQcqFH4Sx_Tm0PA1m0,1123
|
||||
lxml/includes/config.pxd,sha256=H6Mrl8It21hzRI2hzMId9W48QqkYYkoLT4dniLNmdTw,96
|
||||
lxml/includes/dtdvalid.pxd,sha256=Rf2vRBbM4O1AOiIsUk_5M7pV3Dz309sS7Ccd2zGFHT0,671
|
||||
lxml/includes/etree_defs.h,sha256=HGkAmwH4kDj9QQOg0Alw1jRuKkCmVg4yeiTz93gNjrQ,15762
|
||||
lxml/includes/etree_defs.h,sha256=nQXhLCcSoGpFhsCbhI2cTSJR4mIZyGAPzFt641uAzTU,15559
|
||||
lxml/includes/etreepublic.pxd,sha256=3cdjIVlfkeZWYUav4y_T2uHwAo8yUCTlCvNLEvsZ_aI,10122
|
||||
lxml/includes/htmlparser.pxd,sha256=Va2qbs5zVokERn57HbDY__CiBQOoCS4uI9wEfCnT6zk,2868
|
||||
lxml/includes/libexslt/exslt.h,sha256=Z91WbHADa4o5-kJufstf6Y100qBTMqBiK1aZsxcp_Ao,3018
|
||||
|
|
@ -75,7 +76,7 @@ lxml/includes/libxml/debugXML.h,sha256=eatflryQfcmuAgmyz_f3JoSpTmvDA26mrcUjd7vwS
|
|||
lxml/includes/libxml/dict.h,sha256=o36P53gHvahFTU4K-RMkeqy5oJzXza_akJ069CmdorE,1955
|
||||
lxml/includes/libxml/encoding.h,sha256=bzmHUnU-pUjQIqMOqrEml5KapMOmZ8MeoNO5VIro0ck,8507
|
||||
lxml/includes/libxml/entities.h,sha256=uJ8I3voqfwMEw8MQJveLtS0mOanjzzREreKrSs8_018,4712
|
||||
lxml/includes/libxml/globals.h,sha256=CHp7u46nJ-qE4N4tFVS6xRXnQgrnqEvKA0u2744F34M,14694
|
||||
lxml/includes/libxml/globals.h,sha256=bjkOtarZpUFFa5QYE5gN3t0RtRIsXHQQJg8ulxQHAKQ,14670
|
||||
lxml/includes/libxml/hash.h,sha256=81Gch4yaE4oXlKhM-jwPpVkf7zig2kH5b-wdrCkINpY,6603
|
||||
lxml/includes/libxml/list.h,sha256=b7h42wGsDQTVWXsRutjNe1n00_zXfDIXr-iBOHvSThg,3348
|
||||
lxml/includes/libxml/nanoftp.h,sha256=HOW15FcLYD7A7hvdcqz3JxGYVBraqjiTodtx-pBqQ5g,3758
|
||||
|
|
@ -86,7 +87,7 @@ lxml/includes/libxml/relaxng.h,sha256=D1ufdqizDSPx8wOL_ZsjuIl--nK52cWMiZwIdEIbhS
|
|||
lxml/includes/libxml/schemasInternals.h,sha256=I1VSv5fO7wDHdgSoR2xrcUSGL1UEeOgabpnZT5wXayo,26243
|
||||
lxml/includes/libxml/schematron.h,sha256=lNOe9oFbhBqk1GVv4nJ4eZR3tieJVuw-gqbrmPtG3K4,4371
|
||||
lxml/includes/libxml/threads.h,sha256=4OopyFEmDIicmsj7cYzzlpEswbXSiHHM5LJakZ9Vw5Y,1958
|
||||
lxml/includes/libxml/tree.h,sha256=80Hw_WvLrk4P3yruakmhoIzMXn0RLtsikDIGUk2n8Tc,38105
|
||||
lxml/includes/libxml/tree.h,sha256=Vbh95HbDdJ8MmJyt-y2fDUMBl8unhC2xau7Rw3Ypkxk,38107
|
||||
lxml/includes/libxml/uri.h,sha256=nGU1MVe2zr7e3jReDYKCMPQkTkQRN-iNlLewkpP9cLo,2664
|
||||
lxml/includes/libxml/valid.h,sha256=__oCp9iK1nJc7s2iRZqtz8iHu6--9-XI_MWLXIBq_C0,13622
|
||||
lxml/includes/libxml/xinclude.h,sha256=iL_sqfaWIhThheHWBbEUQt59_sd-jnExhxaYeXxInqk,2967
|
||||
|
|
@ -94,7 +95,7 @@ lxml/includes/libxml/xlink.h,sha256=hV-cvCxIJ_F1VdWcMYZ3w2jkGwWyLc9SZ8PdnUZxYNs,
|
|||
lxml/includes/libxml/xmlIO.h,sha256=-5MYRiCCuO81Y23ldZJU7Uh_my3U7yyg9rMfahcVans,10611
|
||||
lxml/includes/libxml/xmlautomata.h,sha256=rIJxLWBGZrfkFYDXdJZBoAhygp93vFBO_WI6nUCxBN4,3956
|
||||
lxml/includes/libxml/xmlerror.h,sha256=I7xskOqrTkctmlL76j2-_VMmMB_RPcXTglE1jHRXa5g,36808
|
||||
lxml/includes/libxml/xmlexports.h,sha256=xKNFpSDT-d53xTWeyClzXtsFusNiyo9l4Iwo4JNc7MM,3920
|
||||
lxml/includes/libxml/xmlexports.h,sha256=STps2gtHl-dNVoWDBdsg1liYi88JYJYTjBp30KEeOYc,3933
|
||||
lxml/includes/libxml/xmlmemory.h,sha256=Z6y0IQCIKXfVnYOPiGoFwc5Hq4rUdZ5AJwKJeav0TNw,5945
|
||||
lxml/includes/libxml/xmlmodule.h,sha256=c5vXusZj46FsM9UPHGt8g9gdPhTVOH1rJEFf2pJ8K4c,1170
|
||||
lxml/includes/libxml/xmlreader.h,sha256=mAAVz-ZYrOt56fzLds-ytusW7UqEGS5L9BGi5kzpTv4,12607
|
||||
|
|
@ -104,7 +105,7 @@ lxml/includes/libxml/xmlschemas.h,sha256=mvK9-OmM-FxfAPSpfkte4R-EWdkwvY6WFX6JmUe
|
|||
lxml/includes/libxml/xmlschemastypes.h,sha256=alMLzZOds02Ksbv7K86owr0_IXjFPQ2Kk99rGhniZPE,4841
|
||||
lxml/includes/libxml/xmlstring.h,sha256=P_40FyEE40e_8h8Tlk9TSNze1zrJygFgsxkFydPnnPs,5511
|
||||
lxml/includes/libxml/xmlunicode.h,sha256=TpTZ8Bf313Rs9m-ww1cBCHwvW-uHj9tQ125iQfaDorU,9993
|
||||
lxml/includes/libxml/xmlversion.h,sha256=pSoknZ25YKMWwkJ8028-8KZo8KboB20LDexdwmUgl9Y,8092
|
||||
lxml/includes/libxml/xmlversion.h,sha256=QfvdigZn28-v7eoo5cout_QssMYibltZVz-FiWsMp34,8092
|
||||
lxml/includes/libxml/xmlwriter.h,sha256=ddjdRh9PBH-FynmNgjkRg1JFBRzlZBPyyh7FX3JX1lY,21265
|
||||
lxml/includes/libxml/xpath.h,sha256=zo45KZIebdrOgK-Zu7kWQMm9yAs4pt_5b5QGnDApMc0,16398
|
||||
lxml/includes/libxml/xpathInternals.h,sha256=EWeEX1yCVHsUUeDxxOe-4jO25LBEDoM564CoPc1YNGU,19353
|
||||
|
|
@ -130,7 +131,7 @@ lxml/includes/libxslt/xsltconfig.h,sha256=C7HE2Bfyf43jlS-z7L8emxkMdYJ5TVQQc8aCjf
|
|||
lxml/includes/libxslt/xsltexports.h,sha256=QLg1cfT3LW3m1iQnduDbstdg88cIBlPkaxMx3hlB7vE,3426
|
||||
lxml/includes/libxslt/xsltlocale.h,sha256=yOkJGQNiD39fwBYus1TpgSmb1mEJstXcHx3O_Q03d_w,1549
|
||||
lxml/includes/libxslt/xsltutils.h,sha256=D2Gqop4cieJiOsQtLWTJezGea9kONcUFxeykLjGRI_E,8297
|
||||
lxml/includes/lxml-version.h,sha256=is1wNkHY9Z1i6w0Rxj0ANHD7B1zz6a_5kkdhR3NhL-o,71
|
||||
lxml/includes/lxml-version.h,sha256=ksjumcbYtPg9oZibhB0FPK8kjiY2L-XApmMxf0p1ouY,71
|
||||
lxml/includes/relaxng.pxd,sha256=12yapjqDZLF_HTlcuSXSoQpPGK1NU7fj7gzS1EF8kZw,2669
|
||||
lxml/includes/schematron.pxd,sha256=5_PUpLHTzzYZ_d-8d2OjKLdwtLIdOm7C20HFUAX8hD4,1640
|
||||
lxml/includes/tree.pxd,sha256=qiuNwXRKAsV0xJoSNBmKc7RclDn_5GI93MCHes2xbW8,19952
|
||||
|
|
@ -141,20 +142,21 @@ lxml/includes/xmlparser.pxd,sha256=v-G3Y11eR4C1e2ImWLmGZpuTA90Y9N_uy-8H0-zwJY8,1
|
|||
lxml/includes/xmlschema.pxd,sha256=yYQFrIKAQ_feenENV24X2AZyBIYGBltRDm9qB7CYMww,1696
|
||||
lxml/includes/xpath.pxd,sha256=tKYAcwpbSRq8qrsZ2ISVYvEaLnCV9GadNC5o_f8Ua_g,5794
|
||||
lxml/includes/xslt.pxd,sha256=qBU-0dLhIMQFv58I4q1XkBq9QJpJzKEAK9qBFPXBj_g,8341
|
||||
lxml/isoschematron/__init__.py,sha256=FzrpeBJets_w6BH3MW1VbwTfThS35XL_Hk0bGr-NcOQ,12408
|
||||
lxml/isoschematron/__init__.py,sha256=NUoI0bb87VB2XePzFcMtwUasrUAQACfb3Z9dPaMz6Fs,12399
|
||||
lxml/isoschematron/__pycache__/__init__.cpython-37.pyc,,
|
||||
lxml/isoschematron/resources/rng/iso-schematron.rng,sha256=cFvf7ObbuHh52exAqMlTBlGu-5iuOH2pE0WERkdC1Tk,15572
|
||||
lxml/isoschematron/resources/rng/iso-schematron.rng,sha256=VsWxPyi3iViJDDbjJJw0wWkEHkLrz9zoCA8zJLor9N4,18337
|
||||
lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl,sha256=ObebsB8Wt-d3uIA_U5NU85TpnQ3PxPX38TdOAqosMac,3172
|
||||
lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl,sha256=QweRrIIM-zFcgg98GXA2CaWfIbgVE0XKEeYSfvv67A0,4563
|
||||
lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl,sha256=0SdZY7oqbDgbuIjB9NpUHLXbMmFHVkxIEUZwTa3iRMM,10917
|
||||
lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl,sha256=xSZ_Ekq_I-62ZpiE5AqYYHwFW_qh855zt9V4_s7rbkY,11703
|
||||
lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl,sha256=x42QJ-dxQ1waPzydsCoQnp2Xj15y53nW43O7BuoDRHk,39957
|
||||
lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl,sha256=Tr9BnO6pzjVWwhqJfm10UlvAy95EgfSCz2iMlrVGT6Q,2015
|
||||
lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl,sha256=ue8q_88X4e_jsJizo31GRNBxNhdxkEE9fY20oq0Iqwk,71764
|
||||
lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl,sha256=BBAdsVSi5zAzeGepuN6gS1saQINDqITXKplmmj4dTWg,20382
|
||||
lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt,sha256=AVTFPZpEKzuHr7OvQZmhaU3LvwKz06AJw8mT_pNh2yI,3144
|
||||
lxml/lxml.etree.h,sha256=tVxNPlBEYitAxLTZi89zq_kT6T2__8DNeT7sD0kzO-U,8554
|
||||
lxml/lxml.etree_api.h,sha256=Jk5RXUtXl1eDKqJd_Cc-p2jEhQqR2xDNH1ivzBGiJXI,17836
|
||||
lxml/objectify.cpython-37m-darwin.so,sha256=F2qJJaTayQAQ_Z1KNIkxExE35EVwNqJryJLkjPi1gjQ,6871352
|
||||
lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt,sha256=OGLiFswuLJEW5EPYKOeoauuCJFEtVa6jyzBE1OcJI98,3310
|
||||
lxml/lxml.etree.h,sha256=TWrERq5QkJNhXNpaJ78yssgHB1B0FDvH6gdMOxvb6vE,8554
|
||||
lxml/lxml.etree_api.h,sha256=hiYv48QAV9FOBsOxnzaPEwDezna6nZksPuBvnmnWrnY,17471
|
||||
lxml/objectify.cpython-37m-darwin.so,sha256=dW6ODu7iMJ5Rkwj-a84tNfeNu3nrDh8FrSuV8weYoa8,6859304
|
||||
lxml/pyclasslookup.py,sha256=gLD1HM2HtITYYiGzjEOewSwbB7XkVx_NZv_quCt79Oc,92
|
||||
lxml/sax.py,sha256=G3mtmEoFtZSEyThcalLtBdxn0FZNtCPpziTnwRGDUv0,8524
|
||||
lxml/sax.cpython-37m-darwin.so,sha256=Q7kPvIUd61f2h39FRz7YjwNIIepNDUWZFYMiDf0HN58,389332
|
||||
lxml/sax.py,sha256=xwHH7zbL6Vzp26fm50o2Jw1OkdualIcN4QoccYWRbqM,9406
|
||||
lxml/usedoctest.py,sha256=qRgZKQVcAZcl-zN0AIXVJnOsETUXz2nPXkxuzs1lGgk,230
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.31.1)
|
||||
Generator: bdist_wheel (0.32.3)
|
||||
Root-Is-Purelib: false
|
||||
Tag: cp37-cp37m-macosx_10_6_intel
|
||||
Tag: cp37-cp37m-macosx_10_9_intel
|
||||
BIN
lib/python3.7/site-packages/lxml/_elementpath.cpython-37m-darwin.so
Executable file → Normal file
BIN
lib/python3.7/site-packages/lxml/_elementpath.cpython-37m-darwin.so
Executable file → Normal file
Binary file not shown.
|
|
@ -1,3 +1,5 @@
|
|||
# cython: language_level=2
|
||||
|
||||
#
|
||||
# ElementTree
|
||||
# $Id: ElementPath.py 3375 2008-02-13 08:05:08Z fredrik $
|
||||
|
|
@ -53,6 +55,8 @@
|
|||
# you, if needed.
|
||||
##
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re
|
||||
|
||||
xpath_tokenizer_re = re.compile(
|
||||
|
|
|
|||
BIN
lib/python3.7/site-packages/lxml/builder.cpython-37m-darwin.so
Executable file → Normal file
BIN
lib/python3.7/site-packages/lxml/builder.cpython-37m-darwin.so
Executable file → Normal file
Binary file not shown.
|
|
@ -1,3 +1,5 @@
|
|||
# cython: language_level=2
|
||||
|
||||
#
|
||||
# Element generator factory by Fredrik Lundh.
|
||||
#
|
||||
|
|
@ -37,6 +39,8 @@
|
|||
The ``E`` Element factory for generating XML documents.
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import lxml.etree as ET
|
||||
|
||||
from functools import partial
|
||||
|
|
|
|||
|
|
@ -209,13 +209,12 @@ class LXMLOutputChecker(OutputChecker):
|
|||
else:
|
||||
return value
|
||||
html = parser is html_fromstring
|
||||
diff_parts = []
|
||||
diff_parts.append('Expected:')
|
||||
diff_parts.append(self.format_doc(want_doc, html, 2))
|
||||
diff_parts.append('Got:')
|
||||
diff_parts.append(self.format_doc(got_doc, html, 2))
|
||||
diff_parts.append('Diff:')
|
||||
diff_parts.append(self.collect_diff(want_doc, got_doc, html, 2))
|
||||
diff_parts = ['Expected:',
|
||||
self.format_doc(want_doc, html, 2),
|
||||
'Got:',
|
||||
self.format_doc(got_doc, html, 2),
|
||||
'Diff:',
|
||||
self.collect_diff(want_doc, got_doc, html, 2)]
|
||||
return '\n'.join(diff_parts)
|
||||
|
||||
def html_empty_tag(self, el, html=True):
|
||||
|
|
|
|||
BIN
lib/python3.7/site-packages/lxml/etree.cpython-37m-darwin.so
Executable file → Normal file
BIN
lib/python3.7/site-packages/lxml/etree.cpython-37m-darwin.so
Executable file → Normal file
Binary file not shown.
|
|
@ -1,4 +1,4 @@
|
|||
/* Generated by Cython 0.28.5 */
|
||||
/* Generated by Cython 0.29.2 */
|
||||
|
||||
#ifndef __PYX_HAVE__lxml__etree
|
||||
#define __PYX_HAVE__lxml__etree
|
||||
|
|
@ -12,7 +12,7 @@ struct LxmlElementBase;
|
|||
struct LxmlElementClassLookup;
|
||||
struct LxmlFallbackElementClassLookup;
|
||||
|
||||
/* "lxml/etree.pyx":320
|
||||
/* "lxml/etree.pyx":318
|
||||
*
|
||||
* # type of a function that steps from node to node
|
||||
* ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*) # <<<<<<<<<<<<<<
|
||||
|
|
@ -21,7 +21,7 @@ struct LxmlFallbackElementClassLookup;
|
|||
*/
|
||||
typedef xmlNode *(*_node_to_node_function)(xmlNode *);
|
||||
|
||||
/* "lxml/etree.pyx":336
|
||||
/* "lxml/etree.pyx":334
|
||||
* @cython.final
|
||||
* @cython.freelist(8)
|
||||
* cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]: # <<<<<<<<<<<<<<
|
||||
|
|
@ -37,7 +37,7 @@ struct LxmlDocument {
|
|||
struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
|
||||
};
|
||||
|
||||
/* "lxml/etree.pyx":685
|
||||
/* "lxml/etree.pyx":683
|
||||
*
|
||||
* @cython.no_gc_clear
|
||||
* cdef public class _Element [ type LxmlElementType, object LxmlElement ]: # <<<<<<<<<<<<<<
|
||||
|
|
@ -51,7 +51,7 @@ struct LxmlElement {
|
|||
PyObject *_tag;
|
||||
};
|
||||
|
||||
/* "lxml/etree.pyx":1849
|
||||
/* "lxml/etree.pyx":1847
|
||||
*
|
||||
*
|
||||
* cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<<
|
||||
|
|
@ -65,7 +65,7 @@ struct LxmlElementTree {
|
|||
struct LxmlElement *_context_node;
|
||||
};
|
||||
|
||||
/* "lxml/etree.pyx":2576
|
||||
/* "lxml/etree.pyx":2574
|
||||
*
|
||||
*
|
||||
* cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<<
|
||||
|
|
@ -81,7 +81,7 @@ struct LxmlElementTagMatcher {
|
|||
char *_name;
|
||||
};
|
||||
|
||||
/* "lxml/etree.pyx":2607
|
||||
/* "lxml/etree.pyx":2605
|
||||
* self._name = NULL
|
||||
*
|
||||
* cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<<
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
/* Generated by Cython 0.28.5 */
|
||||
/* Generated by Cython 0.29.2 */
|
||||
|
||||
#ifndef __PYX_HAVE_API__lxml__etree
|
||||
#define __PYX_HAVE_API__lxml__etree
|
||||
#ifdef __MINGW64__
|
||||
#define MS_WIN64
|
||||
#endif
|
||||
#include "Python.h"
|
||||
#include "etree.h"
|
||||
|
||||
|
|
@ -103,23 +106,6 @@ static xmlNs *(*__pyx_api_f_4lxml_5etree_findOrBuildNodeNsPrefix)(struct LxmlDoc
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __PYX_HAVE_RT_ImportModule
|
||||
#define __PYX_HAVE_RT_ImportModule
|
||||
static PyObject *__Pyx_ImportModule(const char *name) {
|
||||
PyObject *py_name = 0;
|
||||
PyObject *py_module = 0;
|
||||
py_name = __Pyx_PyIdentifier_FromString(name);
|
||||
if (!py_name)
|
||||
goto bad;
|
||||
py_module = PyImport_Import(py_name);
|
||||
Py_DECREF(py_name);
|
||||
return py_module;
|
||||
bad:
|
||||
Py_XDECREF(py_name);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __PYX_HAVE_RT_ImportFunction
|
||||
#define __PYX_HAVE_RT_ImportFunction
|
||||
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
|
||||
|
|
@ -176,7 +162,7 @@ bad:
|
|||
|
||||
static int import_lxml__etree(void) {
|
||||
PyObject *module = 0;
|
||||
module = __Pyx_ImportModule("lxml.etree");
|
||||
module = PyImport_ImportModule("lxml.etree");
|
||||
if (!module) goto bad;
|
||||
if (__Pyx_ImportFunction(module, "deepcopyNodeToDocument", (void (**)(void))&__pyx_api_f_4lxml_5etree_deepcopyNodeToDocument, "struct LxmlElement *(struct LxmlDocument *, xmlNode *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction(module, "elementTreeFactory", (void (**)(void))&__pyx_api_f_4lxml_5etree_elementTreeFactory, "struct LxmlElementTree *(struct LxmlElement *)") < 0) goto bad;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue