Skip to content

Latest commit

 

History

History
101 lines (63 loc) · 2.13 KB

File metadata and controls

101 lines (63 loc) · 2.13 KB

Svgtrace

Svgtrace Index / Svgtrace

Auto-generated documentation for svgtrace module.

asyncTrace

Show source in init.py:46

Do a trace of an image on the filesystem using the playwright library.

Arguments


  • filename str - The location of the file on the filesystem, use an absolute filepath for this
  • blackAndWhite bool, optional - Trace a black and white SVG. Defaults to False.
  • mode str, optional - Set the mode. See https://github.com/jankovicsandras/imagetracerjs for more information. Defaults to "default".

Returns


  • str - SVG string

Raises


FileNotFoundError f"{filename} does not exist!" OSError "svgtrace.trace/ asyncTrace is not supported in Windows Jupyter Notebooks"

Signature

async def asyncTrace(
    filename: str, blackAndWhite: bool = False, mode: str = "default"
) -> str: ...

skimageTrace

Show source in init.py:113

Do a trace of an pillow image using the skimage library.

Arguments


  • image Image.Image - pillow image to trace

Returns


  • str - SVG string

Signature

def skimageTrace(image: Image.Image) -> str: ...

trace

Show source in init.py:23

Do a trace of an image on the filesystem using the playwright library.

Arguments


  • filename str - The location of the file on the filesystem, use an absolute filepath for this
  • blackAndWhite bool, optional - Trace a black and white SVG. Defaults to False.
  • mode str, optional - Set the mode. See https://github.com/jankovicsandras/imagetracerjs for more information. Defaults to "default".

Returns


  • str - SVG string

Raises


FileNotFoundError f"{filename} does not exist!"

Signature

def trace(filename: str, blackAndWhite: bool = False, mode: str = "default") -> str: ...