ImagePixelEffectTrait
trait ImagePixelEffectTrait
Trait ImagePixelEffectTrait
Methods
Applies a pixelation effect to the image.
Makes the background of the image transparent (or solid white for formats that do not support transparency).
Makes the background of an image transparent (or solid white for JPGs).
Uses the Cloudinary AI Background Removal add-on to make the background of an image transparent.
Applies an ordered dither filter to the image.
Applies a gradient fade effect from the top edge of the image.
Trims pixels according to the transparency levels of a specified overlay image.
Details
static Pixelate
pixelate(int $squareSize = null)
Applies a pixelation effect to the image.
static MakeTransparent
makeTransparent(int $tolerance = null)
Makes the background of the image transparent (or solid white for formats that do not support transparency).
The background is determined as all pixels that resemble the pixels on the edges of the image.
static RemoveBackground
removeBackground(bool $screen = false, string|Color $colorToRemove = null)
Makes the background of an image transparent (or solid white for JPGs).
Use when the background is a uniform color.
static BackgroundRemoval
backgroundRemoval(bool|null $fineEdges = null, array $hints = [])
Uses the Cloudinary AI Background Removal add-on to make the background of an image transparent.
static Dither
dither(int $level = null)
Applies an ordered dither filter to the image.
Use the constants defined in \Cloudinary\Transformation\OrderedDither for $level.
static GradientFade
gradientFade(int $strength = null, string $type = null)
Applies a gradient fade effect from the top edge of the image.
You can specify other edges using the x and y methods of the \Cloudinary\Transformation\GradientFade class.
static CutOut
cutOut(string|Media $source = null)
Trims pixels according to the transparency levels of a specified overlay image.
Wherever an overlay image is transparent, the original is shown, and wherever an overlay is opaque, the resulting image is transparent.