mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
add release notes
This commit is contained in:
parent
73eec9000d
commit
6cabcadae4
14
docs/releasenotes/5.4.0.rst
Normal file
14
docs/releasenotes/5.4.0.rst
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
5.4.0 (unreleased)
|
||||||
|
-----
|
||||||
|
|
||||||
|
|
||||||
|
Other Changes
|
||||||
|
=============
|
||||||
|
|
||||||
|
ImageOps.fit
|
||||||
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Now uses the one resize operation with ``box`` argument internally
|
||||||
|
instead of the crop and scale operations sequence.
|
||||||
|
This improves the performance and accuracy of cropping since
|
||||||
|
``box`` parameter accepts float values.
|
|
@ -6,6 +6,7 @@ Release Notes
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
|
5.4.0
|
||||||
5.3.0
|
5.3.0
|
||||||
5.2.0
|
5.2.0
|
||||||
5.1.0
|
5.1.0
|
||||||
|
|
|
@ -419,7 +419,7 @@ def fit(image, size, method=Image.NEAREST, bleed=0.0, centering=(0.5, 0.5)):
|
||||||
bleed_pixels = (bleed * image.size[0], bleed * image.size[1])
|
bleed_pixels = (bleed * image.size[0], bleed * image.size[1])
|
||||||
|
|
||||||
live_size = (image.size[0] - bleed_pixels[0] * 2,
|
live_size = (image.size[0] - bleed_pixels[0] * 2,
|
||||||
image.size[1] - bleed_pixels[1] * 2)
|
image.size[1] - bleed_pixels[1] * 2)
|
||||||
|
|
||||||
# calculate the aspect ratio of the live_size
|
# calculate the aspect ratio of the live_size
|
||||||
live_size_ratio = float(live_size[0]) / live_size[1]
|
live_size_ratio = float(live_size[0]) / live_size[1]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user