Repro:
import numpy as np
from autotrace import Bitmap
from PIL import Image
image = np.array(Image.open("image.png").convert("RGBA"))
bitmap = Bitmap(image)
vector = bitmap.trace(
despeckle_level=1,
color_count=1,
)
The trace function crashes when despeckle_level or color_count are provided for an image with alpha channel.
Possibly other params as well.
Works fine with no params provided or when there's no alpha channel.
Probably a bug in freeing the options struct?