Quality
class Quality extends BaseAction
Controls the quality of the delivered image or video.
Learn more: Image quality | Video quality
Methods
Quality 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 quality level.
Quality auto.
Quality good.
Quality best.
Quality eco.
Quality low.
Quality jpegmini.
Quality jpegminiBest.
Quality jpegminiHigh.
Quality jpegminiMedium.
Controls the JPEG, WebP, GIF, JPEG XR and JPEG 2000 compression quality.
Adds an optional qualifier to control chroma subsampling
Controls the final quality by setting a maximum quantization percentage
When used together with automatic quality (q_auto): allow switching to PNG8 encoding if the quality algorithm decides that it's more efficient.
Details
__construct($level, mixed ...$values)
Quality 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
static QualityTrait
level(int|string $level)
Sets the quality level.
static QualityTrait
auto($preset = null)
Quality auto.
static QualityTrait
autoGood()
Quality good.
static QualityTrait
autoBest()
Quality best.
static QualityTrait
autoEco()
Quality eco.
static QualityTrait
autoLow()
Quality low.
static QualityTrait
jpegmini(int $level = null)
Quality jpegmini.
static QualityTrait
jpegminiBest()
Quality jpegminiBest.
Alias for jpegmini(JpegMini::BEST)
static QualityTrait
jpegminiHigh()
Quality jpegminiHigh.
Alias for jpegmini(JpegMini::HIGH)
static QualityTrait
jpegminiMedium()
Quality jpegminiMedium.
Alias for jpegmini(JpegMini::MEDIUM)
QualityBuilderTrait
quality(int $level)
Controls the JPEG, WebP, GIF, JPEG XR and JPEG 2000 compression quality.
Reducing the quality is a trade-off between visual quality and file size.
QualityBuilderTrait
chromaSubSampling(string $chromaSubSampling)
Adds an optional qualifier to control chroma subsampling
Chroma sub-sampling is a method of encoding images by implementing less resolution for chroma information (colors) than for luma information (luminance), taking advantage of the human visual system's lower acuity for color differences than for luminance
QualityBuilderTrait
quantization(int $quantization)
Controls the final quality by setting a maximum quantization percentage
Quality
anyFormat()
When used together with automatic quality (q_auto): allow switching to PNG8 encoding if the quality algorithm decides that it's more efficient.
Constants
MAIN_QUALIFIER |
|