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

Bugfix: make decoding_palette and transparent_color variables that get passed along instead of instance variables. #112

Merged
merged 1 commit into from Aug 31, 2016

Conversation

wvanbergen
Copy link
Owner

@wvanbergen wvanbergen commented Jun 23, 2016

Make decoding_palette and transparent_color instance variables of the canvas instead of of the Canvas class.

  • This should make it thread-safe, and allows you to decode multiple images simultaneously.
  • This should prevent lingering state from messing up subsequent image decodes.

Should fix #58. Thanks to @jhamon for finding the cause of this.

…e passed along while decoding instead of instance variables.
@wvanbergen
Copy link
Owner Author

wvanbergen commented Aug 30, 2016

@lencioni any chance you can look at this to see if it makes sense?

@lencioni
Copy link
Collaborator

lencioni commented Aug 31, 2016

This makes sense to me and I like the more functional approach. However, these aren't instance variables, they are local variables, so you might want to update your commit message.

@wvanbergen wvanbergen changed the title Bugfix: make decoding_palette and transparent_color instance variable… Bugfix: make decoding_palette and transparent_color variables that get passed along instead of instance variables. Aug 31, 2016
@wvanbergen wvanbergen merged commit 99db39b into master Aug 31, 2016
2 checks passed
@wvanbergen wvanbergen deleted the transparency_cleanup branch Aug 31, 2016
wvanbergen added a commit to wvanbergen/oily_png that referenced this issue Sep 13, 2016
…an instance variable on the decoding module.

This fixes some issues around transparency, which were fixed in ChunkyPNG before: wvanbergen/chunky_png#112
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Oct 15, 2016
* Update PNG decoding to use palette that is passed around, instead of an
  instance variable on the decoding module.

  This fixes some issues around transparency, which were fixed in ChunkyPNG
  before: wvanbergen/chunky_png#112
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.

2 participants