Qualifier
abstract class Qualifier
Defines how to apply a particular transformation.
Methods
Sets the crop mode.
Controls how much of the original image surrounding the face to keep when using either the 'crop' or 'thumb' cropping modes with face detection.
Sets the x position in pixels.
Sets the y position in pixels.
Injects a custom function into the image transformation pipeline.
Sets the overlay source.
Sets the underlay source.
Sets the angle of the rotation of the asset.
Sets the color.
Defines the background color to use.
Adds a border around the image.
Sets the flag.
Controls the compression quality for images and videos.
Adjusts the opacity of the image and makes it semi-transparent.
Rounds the corners of an asset.
Sets the starting position of the part of the video to keep when trimming videos.
Sets the end position of the part of the video to keep when trimming videos.
Sets the duration of the video to keep.
Sets up a conditional transformation.
Sets the audio codec or removes the audio channel.
Sets the audio sample frequency.
Extracts the specified page(s).
Sets the file format.
Controls the color space used for the delivered image.
Specifies the ICC profile to use for the color space.
Determines which part of the image to keep when any part of the image is cropped. For overlays, this setting determines where to place the overlay.
Applies a pre-defined transformation to the asset.
Injects a custom function into the image transformation pipeline.
Sets any qualifier to any value.
Details
static CropMode
cropMode(string $cropModeName)
Sets the crop mode.
static Zoom
zoom(float $zoom)
Controls how much of the original image surrounding the face to keep when using either the 'crop' or 'thumb' cropping modes with face detection.
static X
x(int $x)
Sets the x position in pixels.
static Y
y(int $y)
Sets the y position in pixels.
static EffectQualifier
effect(string $effectName, mixed ...$values)
Injects a custom function into the image transformation pipeline.
static ImageSource
overlay(mixed $source)
Sets the overlay source.
static ImageSource
underlay(mixed $source)
Sets the underlay source.
static Angle
angle(int|string|array|mixed ...$degree)
Sets the angle of the rotation of the asset.
static ColorQualifier
color(string $color)
Sets the color.
static Background
background(array ...$value)
Defines the background color to use.
This applies to various scenarios including: * Defining the color to use instead of transparent background areas when converting to a format that does not support transparency * Using the pad crop mode * Setting the color behind a text overlay * Setting the color behind subtitles
static BorderQualifier
border(array ...$value)
Adds a border around the image.
static FlagQualifier
flag(string $flagName, mixed $value = null)
Sets the flag.
static QualityQualifier
quality(mixed $level, string|null $preset = null)
Controls the compression quality for images and videos.
Reducing the quality is a trade-off between visual quality and file size.
static Opacity
opacity(int $level)
Adjusts the opacity of the image and makes it semi-transparent.
static CornerRadius
cornerRadius(array ...$value)
Rounds the corners of an asset.
static StartOffset
startOffset(mixed $startOffset)
Sets the starting position of the part of the video to keep when trimming videos.
static EndOffset
endOffset(mixed $endOffset)
Sets the end position of the part of the video to keep when trimming videos.
static Duration
duration(mixed $duration)
Sets the duration of the video to keep.
static IfCondition
ifCondition(string|null $expression)
Sets up a conditional transformation.
static AudioCodec
audioCodec(string $audioCodec)
Sets the audio codec or removes the audio channel.
static AudioFrequency
audioFrequency(string $audioFrequency)
Sets the audio sample frequency.
static PageQualifier
page(mixed $page)
Extracts the specified page(s).
static FormatQualifier
format(string $format)
Sets the file format.
static ColorSpace
colorSpace(string $colorSpace)
Controls the color space used for the delivered image.
Use the constants defined in \Cloudinary\Transformation\ColorSpace for $colorSpace.
static ColorSpace
colorSpaceFromIcc(string $publicId)
Specifies the ICC profile to use for the color space.
The ICC file must be uploaded to your cloud as a raw, authenticated file.
Alias for ColorSpace::icc
static GravityQualifier
gravity(mixed $gravity)
Determines which part of the image to keep when any part of the image is cropped. For overlays, this setting determines where to place the overlay.
static NamedTransformation
namedTransformation(string $transformationName)
Applies a pre-defined transformation to the asset.
static CustomFunction
customFunction(string $source, string|null $type = null, bool $preprocess = false)
Injects a custom function into the image transformation pipeline.
static GenericQualifier
generic(string $genericKey, mixed ...$value)
Sets any qualifier to any value.
For future compatibility.