Project

General

Profile

Actions

Task #67754

closed

Cleanup "crop" implementation

Added by Bernhard Kraft almost 9 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Start date:
2015-06-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

For 7.3 an image "crop" functionality got added to the features of TYPO3.

The current implemntation is not really a neat one. Let me point out why.

First a rather strange construct had to get added at at least two different placed in the core:

1. line 106 of ImageViewHelper:
https://git.typo3.org/Packages/TYPO3.CMS.git/blob/refs/heads/TYPO3_7-3:/typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php#l106

2. method "getImgResource" of "ContentObjectRenderer"
https://git.typo3.org/Packages/TYPO3.CMS.git/blob/refs/heads/TYPO3_7-3:/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php#l5477

Instead of this solution ContentObjectRenderer and Extbase\Service\Image\ImageService should have get changed to pass any FileReference along to the ImageProcessingService.

For this to work a few issues would have to get taken care of:

1. The "Resource\FileReference" class will require a "process" method similar to that of Resource\File

2. The "Resource\ProcessedFileRepository" will need to take care of both: Resource\File and Resource\FileReference

3. The "Resourcce\Processing\LocalCropScaleMaskHelper" class would have to get modified to take care of a FileReference and use the crop-property of the FileReference if not overruled by configuration.

When those changes get applied cropping would be implemented cleanly at one single location/class.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Task #54229: Refactor Processor Registry like the Extractor registryClosedSteffen Ritter2014-03-11

Actions
Related to TYPO3 Core - Bug #76659: Click-Enlarge does not show cropped imageClosed2016-06-16

Actions
Related to TYPO3 Core - Feature #70858: Add possibility to "hook" into the processing chain Closed2015-10-20

Actions
Actions

Also available in: Atom PDF