[BUGFIX] LocalCropScaleMaskHelper consumes too much memory when cropping 89/43389/3
authorThomas Maroschik <tmaroschik@dfau.de>
Thu, 17 Sep 2015 09:35:39 +0000 (11:35 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Thu, 17 Sep 2015 20:51:43 +0000 (22:51 +0200)
commit68c765dde1a713749e9873713484eac457eef274
treef58610e8faad99a1ce8c22126ebd5e10041d6a36
parentb0cf9d8e7dc0835cd58ffe1d4b38424a3f60289a
[BUGFIX] LocalCropScaleMaskHelper consumes too much memory when cropping

When using the new image crop functionality in the backend the
LocalCropScaleMaskHelper crops the image using gdlib functions. Those
functions load the whole image into memory and can lead to fatal
errors because of memory limits in case of large images.

This fix replaces the gdlib functions with according ImageMagick/
GraphicsMagick functions which crop the image outside of PHP's
memory.

Resolves: #68484
Releases: master
Change-Id: I390264838ebfd89701f860302a07b3f5895d46ac
Reviewed-on: http://review.typo3.org/43389
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Andreas Bouche <andreas.bouche@flagbit.de>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Classes/Resource/Processing/LocalCropScaleMaskHelper.php