diff --git a/HISTORY.rst b/HISTORY.rst index 4fa0ba0b7a..e3cfdcedb3 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,8 @@ ================== - Backport resize transformation math operation fix (GitLab #319). - Update Pillow to 3.1.2 (Security fix). +- Backport zoom transformation performance improvement (GitLab #334). + 2.1.4 (2016-10-28) ================== diff --git a/docs/releases/2.1.5.rst b/docs/releases/2.1.5.rst index a8448d1365..015bc9a9b9 100644 --- a/docs/releases/2.1.5.rst +++ b/docs/releases/2.1.5.rst @@ -12,11 +12,15 @@ This is a bug-fix release and all users are encouraged to upgrade. Other changes ------------- +- Backport resize transformation math operation fix (GitLab #319). - Update Pillow to 3.1.2 - https://pillow.readthedocs.io/en/3.4.x/releasenotes/3.1.1.html - https://pillow.readthedocs.io/en/3.4.x/releasenotes/3.1.2.html +- Backport zoom performance improvement (GitLab #334). + + Removals -------- * None @@ -70,6 +74,7 @@ Backward incompatible changes Bugs fixed or issues closed =========================== -* `GitLab issue #311 `_ acl page return ContentType:Document +* `GitLab issue #319 `_ TransformationResize issue with very "long" image +* `GitLab issue #334 `_ Perfomance improvment: prevent unnecessary image.resize in TransformationZoom .. _PyPI: https://pypi.python.org/pypi/mayan-edms/ diff --git a/mayan/apps/converter/classes.py b/mayan/apps/converter/classes.py index f7b8b22bfe..74388e13d0 100644 --- a/mayan/apps/converter/classes.py +++ b/mayan/apps/converter/classes.py @@ -309,6 +309,9 @@ class TransformationZoom(BaseTransformation): def execute_on(self, *args, **kwargs): super(TransformationZoom, self).execute_on(*args, **kwargs) + if self.percent == 100: + return self.image + decimal_value = float(self.percent) / 100 return self.image.resize( (