‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Resource\Processing\LocalCropScaleMaskHelper Class Reference

Public Member Functions

array null process (TaskInterface $task)
 
 processWithLocalFile (TaskInterface $task, string $originalFileName)
 

Protected Member Functions

 getFilenameForImageCropScaleMask (TaskInterface $task)
 

Detailed Description

Helper class to locally perform a crop/scale/mask task with the TYPO3 image processing classes.

Definition at line 27 of file LocalCropScaleMaskHelper.php.

Member Function Documentation

◆ getFilenameForImageCropScaleMask()

TYPO3\CMS\Core\Resource\Processing\LocalCropScaleMaskHelper::getFilenameForImageCropScaleMask ( TaskInterface  $task)
protected

◆ process()

array null TYPO3\CMS\Core\Resource\Processing\LocalCropScaleMaskHelper::process ( TaskInterface  $task)

This method actually does the processing of files locally

Takes the original file (for remote storages this will be fetched from the remote server), does the IM magic on the local server by creating a temporary typo3temp/ file, copies the typo3temp/ file to the processing folder of the target storage and removes the typo3temp/ file.

The returned array has the following structure: width => 100 height => 200 filePath => /some/path

If filePath isn't set but width and height are the original file is used as ProcessedFile with the returned width and height. This is for example useful for SVG images.

Parameters
TaskInterface$task
Returns
‪array|null

Definition at line 48 of file LocalCropScaleMaskHelper.php.

References TYPO3\CMS\Core\Resource\Processing\TaskInterface\getSourceFile(), and TYPO3\CMS\Core\Resource\Processing\LocalCropScaleMaskHelper\processWithLocalFile().

◆ processWithLocalFile()

TYPO3\CMS\Core\Resource\Processing\LocalCropScaleMaskHelper::processWithLocalFile ( TaskInterface  $task,
string  $originalFileName 
)