MiscEffectTrait
trait MiscEffectTrait
Trait MiscEffectTrait
Methods
Applies the selected artistic filter to the image.
Applies a cartoon effect to an image.
Transfers the style of a source artwork to a target photograph using the Neural Artwork Style Transfer add-on.
Applies an oil painting effect to the image.
Removes red eyes in the image.
Removes red eyes with the Advanced Facial Attribute Detection add-on.
Vectorizes the image.
Adds an outline to a transparent image.
Adds a shadow to the image.
Adds a natural looking shadow to an image.
Details
static mixed
artisticFilter(string $filter)
Applies the selected artistic filter to the image.
See the Image Transformations guide for examples of each of the filters.
static Cartoonify
cartoonify(float $lineStrength = null, float|string $colorReduction = null)
Applies a cartoon effect to an image.
static EffectAction
styleTransfer(string $source, int $strength = null, bool $preserveColor = null)
Transfers the style of a source artwork to a target photograph using the Neural Artwork Style Transfer add-on.
For details, see the Neural Artwork Style Transfer add-on documentation.
static StrengthEffectAction
oilPaint(int $strength = null)
Applies an oil painting effect to the image.
static EffectAction
redEye()
Removes red eyes in the image.
static EffectAction
advancedRedEye()
Removes red eyes with the Advanced Facial Attribute Detection add-on.
For details, see the Advanced Facial Attribute Detection add-on documentation.
static Vectorize
vectorize(int $colors = null, float $detail = null, float $despeckle = null, int $corners = null, int $paths = null)
Vectorizes the image.
Use the methods in \Cloudinary\Transformation\Vectorize to control different aspects of the vectorize effect.
Notes: * To deliver the image as a vector image, make sure to change the format (or URL extension) to a vector format, such as SVG. However, you can also deliver in a raster format if you just want to get the 'vectorized' graphic effect. * Large images are scaled down to 1000 pixels in the largest dimension before vectorization.
static Outline
outline(string $mode = null, int $width = null, int $blurLevel = null)
Adds an outline to a transparent image.
For examples, see the Image Transformations guide.
static Shadow
shadow(int $strength = null, PointValue $position = null, string $color = null)
Adds a shadow to the image.
The shadow is offset by the x and y values specified in the $position qualifier.
static DropShadow
dropShadow(int $azimuth = null, int $elevation = null, int $spread = null)
Adds a natural looking shadow to an image.