Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: api for transparency detection #213

Open
pklada opened this issue Aug 6, 2021 · 1 comment
Open

Feature request: api for transparency detection #213

pklada opened this issue Aug 6, 2021 · 1 comment

Comments

@pklada
Copy link

pklada commented Aug 6, 2021

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!

@akhlopyk
Copy link

Vote for this feature! I need it too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants