Stroke or outline

Stroke effect applies a colored outline with a given radius around opaque areas of an image. Partially transparent areas will be considered if the transparency level is 50% or higher.

Outline can be applied only to raster layers. If it necessary to draw an outline around a text or an SVG image, it is recommended to render those elements into a group layer first.

The outline filter takes two parameters:

  • r Outline radius in pixels

  • c Outline color in the standard color format (rrggbb or rrggbbaa)

For example: Create a sticker based on an image

https://fx.images.drivecommerce.com/api/v1/drive/image/?layer=0&src=CZ-BOX2000X2000CCFCFCFFF&&layer&src=dog-sticker&fx=out(r:60;c:ffffff),sdw(x:10;y:10;b:5;c:000000;o:0.5)&scale=0.75

image-20250120-215817.png

Effects order

As the outline effect increases the image dimensions, shadow and glow effects are always applied after the outline.