Skip to content

[BUG] free(): invalid pointer when tracing PNG #56

Closed

Description

@lemonyte

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions