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

Public Member Functions

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

Protected Member Functions

array getConfigurationForImageCropScaleMask (ProcessedFile $processedFile, GifBuilder $gifBuilder)
 
string getFilenameForImageCropScaleMask (TaskInterface $task)
 
string modifyImageMagickStripProfileParameters (string $parameters, array $configuration)
 
 isTemporaryFile (string $filePath)
 

Detailed Description

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

Definition at line 30 of file LocalCropScaleMaskHelper.php.

Member Function Documentation

◆ getConfigurationForImageCropScaleMask()

array TYPO3\CMS\Core\Resource\Processing\LocalCropScaleMaskHelper::getConfigurationForImageCropScaleMask ( ProcessedFile  $processedFile,
GifBuilder  $gifBuilder 
)
protected
Parameters
Resource\ProcessedFile$processedFile
\TYPO3\CMS\Frontend\Imaging\GifBuilder$gifBuilder
Returns
‪array

Definition at line 221 of file LocalCropScaleMaskHelper.php.

References TYPO3\CMS\Core\Resource\ProcessedFile\getProcessingConfiguration().

Referenced by TYPO3\CMS\Core\Resource\Processing\LocalCropScaleMaskHelper\processWithLocalFile().

◆ getFilenameForImageCropScaleMask()

◆ isTemporaryFile()

TYPO3\CMS\Core\Resource\Processing\LocalCropScaleMaskHelper::isTemporaryFile ( string  $filePath)
protected

◆ modifyImageMagickStripProfileParameters()

string TYPO3\CMS\Core\Resource\Processing\LocalCropScaleMaskHelper::modifyImageMagickStripProfileParameters ( string  $parameters,
array  $configuration 
)
protected

Modifies the parameters for ImageMagick for stripping of profile information.

Parameters
string$parameters‪The parameters to be modified (if required)
array$configuration‪The TypoScript configuration of [IMAGE].file
Returns
‪string

Definition at line 274 of file LocalCropScaleMaskHelper.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\Resource\Processing\LocalCropScaleMaskHelper\processWithLocalFile().

◆ 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 51 of file LocalCropScaleMaskHelper.php.

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

◆ processWithLocalFile()