-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
if a image just have a color, "getPalette" methods is throw error #242
Comments
Why was this closed without a solution/fix? |
I ran into this yesterday too. It's because color-thief will fail on any image that only has white/near-white pixels: Lines 12 to 17 in 4dc3bb0
|
wow,you responsed me!
ok, i see this,but i don't know why can't support the image in pure color
…________________________________
发件人: Tim Van ***@***.***>
发送时间: 2024年4月17日 16:19
收件人: lokesh/color-thief ***@***.***>
抄送: 浮云 ***@***.***>; Author ***@***.***>
主题: Re: [lokesh/color-thief] if a image just have a color, "getPalette" methods is throw error (Issue #242)
I ran into this yesterday too.
It's because color-thief will fail on any image that only has white/near-white pixels: https://github.com/lokesh/color-thief/blob/4dc3bb0b43250f0d006278998aa91c4156f77cc3/src/core.js#L12-L17
―
Reply to this email directly, view it on GitHub<#242 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AXGW4TCLLYGQUNREP7YRUILY5YV7LAVCNFSM6AAAAAAZLRXDD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRQGY3TONRXGA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Hello
When I use it to get color,i upload this image,but it is throw error
white image
and the code is:
The text was updated successfully, but these errors were encountered: