Skip to content

Feature request: api for transparency detection #213

@pklada

Description

@pklada

Firstly, I love this library and we use it throughout our product. That said, we often use the feature to add a background color to the "frame" of an image if it doesn't fit its bounds. In most cases, we want to disable this behavior and simply render a white background if the image has transparency as otherwise this can produce strange results.

Ideally, for performance reasons, we don't double sample the image to determine transparency and color. Would it make sense if color thief could returned something like hasTransparency with the color palette, or would you consider that out of the scope of this project? Thanks!

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