[TASK] Migrate ImageMagick $info array to dedicated object
This change introduces a few number of non-breaking details to be used for further (breaking) changes in the Image Processing chain. On the very low-level A new object called "ImageProcessingResult" is now used to have the previously $info array $info[0] = width of an image $info[1] = height of an image $info[2] = file extension $info[3] = full file path now consumed in an object that is used throughout the lowlevel area of GraphicalFunctions, Image Procesing and GifBuilder. The GraphicalFunctions method receives some smarter methods (currently internal): * resize() - similar to imageMagickConvert() but with type hints, and returning the new object * convert() - e.g. just convert a jpeg to png Next steps in this area: * cObject->getImageResource() should only return ImageProcessingResult (and migrate the hook to a PSR-14 event) - Breaking * GraphicalFunctions->getImageDimensions() and imageMagickConvert() should only return these objects (or null) - Breaking * ImageProcessingResult->toLegacyArray() should be removed * Have Local*Helper classes return this object or just the file name or an ImageInfo object or get rid of them completely - Breaking * Move "image types available for the browser" into a service class out of GraphicalFunctions Resolves: #102679 Releases: main Change-Id: Iefef621dff961dfdd8ff89c43b7b3b78363376a2 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81428 Reviewed-by:Oliver Klee <typo3-coding@oliverklee.de> Tested-by:
Oliver Klee <typo3-coding@oliverklee.de> Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Oliver Bartsch <bo@cedev.de>
Showing
- typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php 81 additions, 48 deletionstypo3/sysext/core/Classes/Imaging/GraphicalFunctions.php
- typo3/sysext/core/Classes/Imaging/ImageProcessingResult.php 103 additions, 0 deletionstypo3/sysext/core/Classes/Imaging/ImageProcessingResult.php
- typo3/sysext/core/Classes/Resource/Processing/LocalCropScaleMaskHelper.php 13 additions, 17 deletions.../Classes/Resource/Processing/LocalCropScaleMaskHelper.php
- typo3/sysext/core/Classes/Resource/Processing/LocalPreviewHelper.php 2 additions, 2 deletions...t/core/Classes/Resource/Processing/LocalPreviewHelper.php
- typo3/sysext/core/Tests/Unit/Imaging/ImageProcessingInstructionsTest.php 2 additions, 0 deletions...re/Tests/Unit/Imaging/ImageProcessingInstructionsTest.php
- typo3/sysext/frontend/Classes/Imaging/GifBuilder.php 25 additions, 22 deletionstypo3/sysext/frontend/Classes/Imaging/GifBuilder.php
- typo3/sysext/install/Classes/Controller/EnvironmentController.php 24 additions, 24 deletions...sext/install/Classes/Controller/EnvironmentController.php
Please register or sign in to comment