BaseResizeAction
abstract class BaseResizeAction extends BaseAction
Class BaseResizeAction
Methods
BaseResize constructor.
Adds the qualifier to the action.
Adds qualifiers to the action.
Adds (sets) generic (raw) action.
Sets the flag.
Removes the flag.
Serializes to json.
Serializes to Cloudinary URL format
Sets the width and height of the asset.
Sets the aspect ratio of the asset.
Creates a new instance using provided array of qualifiers
Sets the resize mode.
Modifies percentage-based width & height qualifiers of overlays and underlays (e.g., 1.0) to be relative to the overlaid region. Currently regions are only defined when using gravity 'face', 'faces' or 'custom'.
Modifies percentage-based width & height qualifiers of overlays and underlays (e.g., 1.0) to be relative to the containing image instead of the added layer.
Details
__construct(string|CropMode $cropMode, int|string|Expression $width = null, int|string|Expression $height = null)
BaseResize constructor.
$this
addQualifier(BaseComponent $qualifier = null)
Adds the qualifier to the action.
$this
addQualifiers(array ...$qualifiers)
Adds qualifiers to the action.
BaseAction
setGenericAction(string $action)
Adds (sets) generic (raw) action.
$this
setFlag(FlagQualifier $flag, bool $set = true)
Sets the flag.
$this
unsetFlag(FlagQualifier $flag)
Removes the flag.
$this
importAction(BaseAction|null $action)
Imports (merges) qualifiers and flags from another action.
mixed
jsonSerialize()
Serializes to json.
string
__toString()
Serializes to Cloudinary URL format
DimensionsTrait
width(int|string|Expression $width)
Sets the width of the asset.
DimensionsTrait
height(int|string|Expression $height)
Sets the height of the asset.
$this
size(string $size)
Sets the width and height of the asset.
DimensionsTrait
aspectRatio(float|array|AspectRatio ...$aspectRatio)
Sets the aspect ratio of the asset.
static BaseResizeAction
fromParams(array $qualifiers)
Creates a new instance using provided array of qualifiers
BaseResizeAction
resizeMode(string|FlagQualifier $resizeMode)
Sets the resize mode.
BaseResizeAction
regionRelative()
Modifies percentage-based width & height qualifiers of overlays and underlays (e.g., 1.0) to be relative to the overlaid region. Currently regions are only defined when using gravity 'face', 'faces' or 'custom'.
BaseResizeAction
relative()
Modifies percentage-based width & height qualifiers of overlays and underlays (e.g., 1.0) to be relative to the containing image instead of the added layer.
Constants
MAIN_QUALIFIER |
|