| sd_load_mask | R Documentation |
Reads a PNG and reduces it to a single grayscale channel suitable for inpainting. RGB(A) inputs are averaged across the colour channels; the alpha channel (if any) is ignored.
sd_load_mask(path)
path |
Path to a PNG file. |
Mask semantics match the engine: white (255) = generate (the inpainted region), black (0) = keep the original pixels.
SD image list (width, height, channel = 1, data as raw vector).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.