ImageAdjustmentTrait
trait ImageAdjustmentTrait
Trait ImageAdjustmentTrait
Methods
Adjusts the brightness and blends the result with the original image.
Adjusts the color balance and blends the result with the original image.
Adjusts the contrast and blends the result with the original image.
Adjusts the fill light and blends the result with the original image.
Adjusts the image colors, contrast and brightness.
Applies a vibrance filter on the image.
Enhances an image to its best visual quality with the Viesus Automatic Image Enhancement add-on.
Adjusts the image's red channel.
Adjusts the image's green channel.
Adjusts the image's blue channel.
Adjusts image brightness modulation in HSB to prevent artifacts in some images.
Adjusts the image's hue.
Blends the image with one or more tint colors at the intensity specified.
Maps an input color and those similar to the input color to corresponding shades of a specified output color, taking luminosity and chroma into account, in order to recolor an object in a natural way.
Converts the colors of every pixel in an image based on the supplied color matrix, in which the value of each color channel is calculated based on the values from all other channels (e.g. a 3x3 matrix for RGB, a 4x4 matrix for RGBA or CMYK, etc).
Applies a sharpening filter to the image.
Applies an unsharp mask filter to the image.
Causes all semi-transparent pixels in an image to be either fully transparent or fully opaque.
Adjusts the opacity of the image and makes it semi-transparent.
Details
static BlendEffectAction
autoBrightness(int $blend = null)
Adjusts the brightness and blends the result with the original image.
static BlendEffectAction
autoColor(int $blend = null)
Adjusts the color balance and blends the result with the original image.
static BlendEffectAction
autoContrast(int $blend = null)
Adjusts the contrast and blends the result with the original image.
static FillLight
fillLight(int $blend = null, int $bias = null)
Adjusts the fill light and blends the result with the original image.
static Improve
improve(int $blend = null, string $mode = null)
Adjusts the image colors, contrast and brightness.
Use the constants defined in \Cloudinary\Transformation\Improve for $mode.
static StrengthEffectAction
vibrance(int $strength = null)
Applies a vibrance filter on the image.
static ViesusCorrect
viesusCorrect()
Enhances an image to its best visual quality with the Viesus Automatic Image Enhancement add-on.
For details, see the Viesus Automatic Image Enhancement add-on documentation.
static LevelEffectAction
red(int $level = null)
Adjusts the image's red channel.
static LevelEffectAction
green(int $level = null)
Adjusts the image's green channel.
static LevelEffectAction
blue(int $level = null)
Adjusts the image's blue channel.
static LevelEffectAction
brightnessHSB(int $level = null)
Adjusts image brightness modulation in HSB to prevent artifacts in some images.
static LevelEffectAction
hue(int $level = null)
Adjusts the image's hue.
static EffectAction
tint(array ...$qualifiers)
Blends the image with one or more tint colors at the intensity specified.
Optional - equalize colors before tinting, specify gradient blend positioning per color.
static ReplaceColor
replaceColor(string $toColor, int $tolerance = null, string $fromColor = null)
Maps an input color and those similar to the input color to corresponding shades of a specified output color, taking luminosity and chroma into account, in order to recolor an object in a natural way.
More highly saturated input colors usually give the best results. It is recommended to avoid input colors approaching white, black, or gray.
static EffectAction
recolor(array ...$colorMatrix)
Converts the colors of every pixel in an image based on the supplied color matrix, in which the value of each color channel is calculated based on the values from all other channels (e.g. a 3x3 matrix for RGB, a 4x4 matrix for RGBA or CMYK, etc).
For every pixel in the image, take each color channel and adjust its value by the specified values of the matrix to get a new value.
static StrengthEffectAction
sharpen(int $strength = null)
Applies a sharpening filter to the image.
static StrengthEffectAction
unsharpMask(int $strength = null)
Applies an unsharp mask filter to the image.
static LevelEffectAction
opacityThreshold(int $level = null)
Causes all semi-transparent pixels in an image to be either fully transparent or fully opaque.
Each pixel with an opacity lower than the specified threshold value is set to an opacity of 0%. Each pixel with an opacity greater than the specified threshold is set to an opacity of 100%. For example, setting opacity_threshold:0 makes all pixels non-transparent, while opacity_threshold:100 makes all semi-transparent pixels fully transparent. Note: This effect can be a useful solution when PhotoShop PSD files are delivered in a format supporting partial transparency, such as PNG, and the results without this effect are not as expected.
static Opacity
opacity(float $level)
Adjusts the opacity of the image and makes it semi-transparent.