ConstrainImageProcessor deprecated
class ConstrainImageProcessor implements ProcessorInterface (View source)
deprecated
Properties
protected Application | $app | ||
protected int|null | $maxWidth | Maximum image width (if set). |
|
protected int|null | $maxHeight | Maximum image height (if set). |
|
protected string | $constraintMode | Resize mode (one of the ImageInterface::THUMBNAIL_... constants). |
|
protected bool | $rescanThumbnails | Should thumbnails be rescanned when the image is resized? |
Methods
Initialize the instance.
Get the maximum image width (if set).
Set the maximum image width (if set).
Get the maximum image height (if set).
Set the maximum image height (if set).
Get the resize mode.
Set the resize mode.
Should thumbnails be rescanned when the image is resized?
Should thumbnails be rescanned when the image is resized?
This function is a copy of the core thumbnail() function, modified to allow thumbnailing without making a copy in memory first as it is not always needed depending on the context.
Details
__construct(int|null $maxWidth = null, int|null $maxHeight = null, string|null $constraintMode = null)
Initialize the instance.
int|null
getMaxWidth()
Get the maximum image width (if set).
setMaxWidth(int|null $maxWidth)
Set the maximum image width (if set).
int|null
getMaxHeight()
Get the maximum image height (if set).
setMaxHeight(int|null $maxHeight)
Set the maximum image height (if set).
string
getConstraintMode()
Get the resize mode.
setConstraintMode(string $constraintMode)
Set the resize mode.
bool
isRescanThumbnails()
Should thumbnails be rescanned when the image is resized?
$this
setRescanThumbnails(bool $rescanThumbnails)
Should thumbnails be rescanned when the image is resized?
bool
shouldProcess(Version $version)
Should this processor process a specific file version?
ImageInterface
resizeInPlace(ImageInterface $image, Box $size, string $mode = ImageInterface::THUMBNAIL_INSET, string $filter = ImageInterface::FILTER_UNDEFINED)
This function is a copy of the core thumbnail() function, modified to allow thumbnailing without making a copy in memory first as it is not always needed depending on the context.
process(Version $version)
Process a specific file version.
bool
getResizeInPlace()
deprecated
deprecated
No description
setResizeInPlace(bool $resizeInPlace)
deprecated
deprecated
No description