mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
commit
080d8b0b44
21
Makefile
21
Makefile
|
@ -1,4 +1,16 @@
|
|||
.PHONY: pre clean install test inplace coverage test-dep help docs livedocs
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " clean remove build products"
|
||||
@echo " install make and install"
|
||||
@echo " test run tests on installed pillow"
|
||||
@echo " inplace make inplace extension"
|
||||
@echo " coverage run coverage test (in progress)"
|
||||
@echo " docs make html docs"
|
||||
@echo " docserver run an http server on the docs directory"
|
||||
@echo " test-dep install coveraget and test dependencies"
|
||||
|
||||
pre:
|
||||
virtualenv .
|
||||
|
@ -18,12 +30,11 @@ clean:
|
|||
rm -r build || true
|
||||
find . -name __pycache__ | xargs rm -r || true
|
||||
|
||||
|
||||
install:
|
||||
python setup.py install
|
||||
python selftest.py --installed
|
||||
|
||||
test: install
|
||||
test:
|
||||
python test-installed.py
|
||||
|
||||
inplace: clean
|
||||
|
@ -42,3 +53,9 @@ coverage:
|
|||
|
||||
test-dep:
|
||||
pip install coveralls nose nose-cov pep8 pyflakes
|
||||
|
||||
docs:
|
||||
$(MAKE) -C docs html
|
||||
|
||||
docserver:
|
||||
cd docs/_build/html && python -mSimpleHTTPServer 2> /dev/null&
|
|
@ -1,19 +1,19 @@
|
|||
"""
|
||||
The Python Imaging Library.
|
||||
$Id$
|
||||
## The Python Imaging Library.
|
||||
## $Id$
|
||||
|
||||
Optional color managment support, based on Kevin Cazabon's PyCMS
|
||||
library.
|
||||
## Optional color managment support, based on Kevin Cazabon's PyCMS
|
||||
## library.
|
||||
|
||||
History:
|
||||
2009-03-08 fl Added to PIL.
|
||||
## History:
|
||||
|
||||
Copyright (C) 2002-2003 Kevin Cazabon
|
||||
Copyright (c) 2009 by Fredrik Lundh
|
||||
## 2009-03-08 fl Added to PIL.
|
||||
|
||||
See the README file for information on usage and redistribution. See
|
||||
below for the original description.
|
||||
"""
|
||||
## Copyright (C) 2002-2003 Kevin Cazabon
|
||||
## Copyright (c) 2009 by Fredrik Lundh
|
||||
## Copyright (c) 2013 by Eric Soroos
|
||||
|
||||
## See the README file for information on usage and redistribution. See
|
||||
## below for the original description.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
|
|
|
@ -15,8 +15,11 @@ Improved version of the OleFileIO module from PIL library v1.1.6
|
|||
See: http://www.pythonware.com/products/pil/index.htm
|
||||
|
||||
The Python Imaging Library (PIL) is
|
||||
|
||||
Copyright (c) 1997-2005 by Secret Labs AB
|
||||
|
||||
Copyright (c) 1995-2005 by Fredrik Lundh
|
||||
|
||||
OleFileIO_PL changes are Copyright (c) 2005-2014 by Philippe Lagadec
|
||||
|
||||
See source code and LICENSE.txt for information on usage and redistribution.
|
||||
|
@ -1701,10 +1704,12 @@ class OleFileIO:
|
|||
Open a stream as a read-only file object (BytesIO).
|
||||
|
||||
filename: path of stream in storage tree (except root entry), either:
|
||||
|
||||
- a string using Unix path syntax, for example:
|
||||
'storage_1/storage_1.2/stream'
|
||||
- a list of storage filenames, path to the desired stream/storage.
|
||||
Example: ['storage_1', 'storage_1.2', 'stream']
|
||||
|
||||
return: file object (read-only)
|
||||
raise IOError if filename not found, or if this is not a stream.
|
||||
"""
|
||||
|
@ -1722,6 +1727,7 @@ class OleFileIO:
|
|||
|
||||
filename: path of stream in storage tree. (see openstream for syntax)
|
||||
return: False if object does not exist, its entry type (>0) otherwise:
|
||||
|
||||
- STGTY_STREAM: a stream
|
||||
- STGTY_STORAGE: a storage
|
||||
- STGTY_ROOT: the root entry
|
||||
|
|
|
@ -73,9 +73,8 @@ class PSDraw:
|
|||
|
||||
def setink(self, ink):
|
||||
"""
|
||||
.. warning::
|
||||
.. warning:: This has been in the PIL API for ages but was never implemented.
|
||||
|
||||
This has been in the PIL API for ages but was never implemented.
|
||||
"""
|
||||
print("*** NOT YET IMPLEMENTED ***")
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
* http://www.cazabon.com
|
||||
* Adapted/reworked for PIL by Fredrik Lundh
|
||||
* Copyright (c) 2009 Fredrik Lundh
|
||||
* Updated to LCMS2
|
||||
* Copyright (c) 2013 Eric Soroos
|
||||
*
|
||||
* pyCMS home page: http://www.cazabon.com/pyCMS
|
||||
* littleCMS home page: http://www.littlecms.com
|
||||
|
|
10
docs/PIL.rst
10
docs/PIL.rst
|
@ -52,15 +52,8 @@ can be found here.
|
|||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
:mod:`ImageCms` Module
|
||||
----------------------
|
||||
|
||||
.. automodule:: PIL.ImageCms
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
.. intentionally skipped documenting this because it's not documented anywhere
|
||||
|
||||
:mod:`ImageDraw2` Module
|
||||
------------------------
|
||||
|
||||
|
@ -70,6 +63,7 @@ can be found here.
|
|||
:show-inheritance:
|
||||
|
||||
.. intentionally skipped documenting this because it's deprecated
|
||||
|
||||
:mod:`ImageFileIO` Module
|
||||
-------------------------
|
||||
|
||||
|
|
|
@ -49,7 +49,10 @@ Functions
|
|||
|
||||
.. autofunction:: open
|
||||
|
||||
.. warning:: > To protect against potential DOS attacks caused by "`decompression bombs<https://en.wikipedia.org/wiki/Zip_bomb>`_" (i.e. malicious files which decompress into a huge amount of data and are designed to crash or cause disruption by using up a lot of memory), Pillow will issue a `DecompressionBombWarning` if the image is over a certain limit. If desired, the warning can be turned into an error with `warnings.simplefilter('error', Image.DecompressionBombWarning)` or suppressed entirely with `warnings.simplefilter('ignore', Image.DecompressionBombWarning)`. See also `the logging documentation<https://docs.python.org/2/library/logging.html?highlight=logging#integration-with-the-warnings-module>`_ to have warnings output to the logging facility instead of stderr.
|
||||
.. warning:: To protect against potential DOS attacks caused by "`decompression bombs`_" (i.e. malicious files which decompress into a huge amount of data and are designed to crash or cause disruption by using up a lot of memory), Pillow will issue a `DecompressionBombWarning` if the image is over a certain limit. If desired, the warning can be turned into an error with `warnings.simplefilter('error', Image.DecompressionBombWarning)` or suppressed entirely with `warnings.simplefilter('ignore', Image.DecompressionBombWarning)`. See also `the logging documentation`_ to have warnings output to the logging facility instead of stderr.
|
||||
|
||||
.. _decompression bombs: https://en.wikipedia.org/wiki/Zip_bomb
|
||||
.. _the logging documentation: https://docs.python.org/2/library/logging.html?highlight=logging#integration-with-the-warnings-module
|
||||
|
||||
Image processing
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
|
13
docs/reference/ImageCms.rst
Normal file
13
docs/reference/ImageCms.rst
Normal file
|
@ -0,0 +1,13 @@
|
|||
.. py:module:: PIL.ImageCms
|
||||
.. py:currentmodule:: PIL.ImageCms
|
||||
|
||||
:py:mod:`ImageCms` Module
|
||||
=========================
|
||||
|
||||
The :py:mod:`ImageCms` module provides color profile management
|
||||
support using the LittleCMS2 color management engine, based on Kevin
|
||||
Cazabon's PyCMS library.
|
||||
|
||||
.. automodule:: PIL.ImageCms
|
||||
:members:
|
||||
:noindex:
|
|
@ -8,6 +8,7 @@ Reference
|
|||
Image
|
||||
ImageChops
|
||||
ImageColor
|
||||
ImageCms
|
||||
ImageDraw
|
||||
ImageEnhance
|
||||
ImageFile
|
||||
|
|
Loading…
Reference in New Issue
Block a user