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

Added palette callback function #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

welshcoder
Copy link

Hi,

I've been using this library for some time now, and it works very well.

However, I have an application that requires the palette to be manipulated every now and again. In order to achieve this, I've added a callback that is called during the draw callback function with the palette information. This callback allows the user to manipulate the palette before drawing it. The user can, for example, change the hue of the image without having to do so for each pixel individually.

I've had this working rather well in my application (some nice effects!). It does rely on a change in the AnimatedGIF library, as it needs information on whether it is global or local palette that's being passed. I've got a pull request on that library to do exactly this (bitbank2/AnimatedGIF#59 (comment)).

I hope you find this change useful.

Cheers,
welshcoder

@welshcoder
Copy link
Author

The pull request in the AnimatedGif library that I referenced above has been merged into the master, so this pull request should work with the latest dev version of that library now.

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