mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-03 03:13:04 +03:00
Merge branch 'master' into rm-deprecated-qt
This commit is contained in:
commit
732eb7223f
|
@ -73,15 +73,6 @@ class TestFileTiff(PillowTestCase):
|
||||||
ifd.legacy_api = None
|
ifd.legacy_api = None
|
||||||
self.assertEqual(str(e.exception), "Not allowing setting of legacy api")
|
self.assertEqual(str(e.exception), "Not allowing setting of legacy api")
|
||||||
|
|
||||||
def test_size(self):
|
|
||||||
filename = "Tests/images/pil168.tif"
|
|
||||||
im = Image.open(filename)
|
|
||||||
|
|
||||||
def set_size():
|
|
||||||
im.size = (256, 256)
|
|
||||||
|
|
||||||
self.assert_warning(DeprecationWarning, set_size)
|
|
||||||
|
|
||||||
def test_xyres_tiff(self):
|
def test_xyres_tiff(self):
|
||||||
filename = "Tests/images/pil168.tif"
|
filename = "Tests/images/pil168.tif"
|
||||||
im = Image.open(filename)
|
im = Image.open(filename)
|
||||||
|
|
|
@ -70,19 +70,6 @@ Deprecated Deprecated Deprecated
|
||||||
``IptcImagePlugin.__version__`` ``PixarImagePlugin.__version__``
|
``IptcImagePlugin.__version__`` ``PixarImagePlugin.__version__``
|
||||||
=============================== ================================= ==================================
|
=============================== ================================= ==================================
|
||||||
|
|
||||||
Setting the size of TIFF images
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
.. deprecated:: 5.3.0
|
|
||||||
|
|
||||||
Setting the image size of a TIFF image (eg. ``im.size = (256, 256)``) issues
|
|
||||||
a ``DeprecationWarning``:
|
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
Setting the size of a TIFF image directly is deprecated, and will
|
|
||||||
be removed in a future version. Use the resize method instead.
|
|
||||||
|
|
||||||
ImageCms.CmsProfile attributes
|
ImageCms.CmsProfile attributes
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -127,6 +114,14 @@ Qt 4 reached end-of-life on 2015-12-19. Its Python bindings are also EOL: PyQt4
|
||||||
Support for PyQt4 and PySide has been removed from ``ImageQt``. Please upgrade to PyQt5
|
Support for PyQt4 and PySide has been removed from ``ImageQt``. Please upgrade to PyQt5
|
||||||
or PySide2.
|
or PySide2.
|
||||||
|
|
||||||
|
Setting the size of TIFF images
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
*Removed in version 7.0.0.*
|
||||||
|
|
||||||
|
Setting the size of a TIFF image directly (eg. ``im.size = (256, 256)``) throws
|
||||||
|
an error. Use ``Image.resize`` instead.
|
||||||
|
|
||||||
VERSION constant
|
VERSION constant
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
|
@ -854,7 +854,7 @@ class ImageFileDirectory_v2(MutableMapping):
|
||||||
|
|
||||||
# pass 2: write entries to file
|
# pass 2: write entries to file
|
||||||
for tag, typ, count, value, data in entries:
|
for tag, typ, count, value, data in entries:
|
||||||
if DEBUG > 1:
|
if DEBUG:
|
||||||
print(tag, typ, count, repr(value), repr(data))
|
print(tag, typ, count, repr(value), repr(data))
|
||||||
result += self._pack("HHL4s", tag, typ, count, value)
|
result += self._pack("HHL4s", tag, typ, count, value)
|
||||||
|
|
||||||
|
@ -1079,19 +1079,6 @@ class TiffImageFile(ImageFile.ImageFile):
|
||||||
"""Return the current frame number"""
|
"""Return the current frame number"""
|
||||||
return self.__frame
|
return self.__frame
|
||||||
|
|
||||||
@property
|
|
||||||
def size(self):
|
|
||||||
return self._size
|
|
||||||
|
|
||||||
@size.setter
|
|
||||||
def size(self, value):
|
|
||||||
warnings.warn(
|
|
||||||
"Setting the size of a TIFF image directly is deprecated, and will"
|
|
||||||
" be removed in a future version. Use the resize method instead.",
|
|
||||||
DeprecationWarning,
|
|
||||||
)
|
|
||||||
self._size = value
|
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
if self.use_load_libtiff:
|
if self.use_load_libtiff:
|
||||||
return self._load_libtiff()
|
return self._load_libtiff()
|
||||||
|
|
|
@ -9,7 +9,6 @@ PIL is the Python Imaging Library by Fredrik Lundh and Contributors.
|
||||||
Copyright (c) 1999 by Secret Labs AB.
|
Copyright (c) 1999 by Secret Labs AB.
|
||||||
|
|
||||||
Use PIL.__version__ for this Pillow version.
|
Use PIL.__version__ for this Pillow version.
|
||||||
PIL.VERSION is the old PIL version and will be removed in the future.
|
|
||||||
|
|
||||||
;-)
|
;-)
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user