Skip to content

Handle invalid result from quantize palette call#9

Open
balthazar wants to merge 1 commit intotj:masterfrom
balthazar:master
Open

Handle invalid result from quantize palette call#9
balthazar wants to merge 1 commit intotj:masterfrom
balthazar:master

Conversation

@balthazar
Copy link
Copy Markdown

Sometimes, the palette from the CMap of quantize can return false, leading to an uncaught error. This helps catching it smoothly by returning an empty array.

@balthazar
Copy link
Copy Markdown
Author

After further investigations, it often happens when providing an invalid value of RGB color values. I can create another PR / update this one to prevent this by throwing an error or resetting the value to a valid one, as you prefer @tj.

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

Successfully merging this pull request may close these issues.

1 participant