LocalCropScaleMaskHelper

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

Table of Contents

Methods

process()  : array<string|int, mixed>|null
This method actually does the processing of files locally
processWithLocalFile()  : array<string|int, mixed>|null
Does the heavy lifting prescribed in processTask() except that the processing can be performed on any given local image
getFilenameForImageCropScaleMask()  : string
Returns the filename for a cropped/scaled/masked file which will be put in typo3temp for the time being.

Methods

process()

This method actually does the processing of files locally

public process(TaskInterface $task) : array<string|int, mixed>|null

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
$task : TaskInterface
Return values
array<string|int, mixed>|null

processWithLocalFile()

Does the heavy lifting prescribed in processTask() except that the processing can be performed on any given local image

public processWithLocalFile(TaskInterface $task, string $originalFileName) : array<string|int, mixed>|null
Parameters
$task : TaskInterface
$originalFileName : string
Return values
array<string|int, mixed>|null

getFilenameForImageCropScaleMask()

Returns the filename for a cropped/scaled/masked file which will be put in typo3temp for the time being.

protected getFilenameForImageCropScaleMask(TaskInterface $task) : string
Parameters
$task : TaskInterface
Return values
string

        
On this page

Search results