add release notes

This commit is contained in:
Alexander 2018-10-18 10:58:20 +03:00
parent 73eec9000d
commit 6cabcadae4
3 changed files with 16 additions and 1 deletions

View 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.

View File

@ -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

View File

@ -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]