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

fix in Ascii.terminal_artify() for PNGs with a transparent layer #5

Merged
merged 1 commit into from
May 21, 2016

Conversation

bdef
Copy link

@bdef bdef commented May 20, 2016

getpixel() returns an int, intead of a tuple of ints, when the from_pic
is a PNG with a transparency layer. This fix creates a tuple in that case,
so terminal_artify() can handle PNGs with a transparent layer.

getpixel() returns an int, intead of a tuple of ints, when the from_file
is a PNG with a transparency layer. This fix creates a tuple in that case,
so terminal_artify() can handle PNGs with a transparent layer.
@ProfOak ProfOak merged commit 3d6db8a into ProfOak:master May 21, 2016
@ProfOak
Copy link
Owner

ProfOak commented May 21, 2016

Good catch with the getpixel() return problem! However it should be known that PNG images do not have layers. I get what you mean though. Would you mind sending me an image that breaks the code without this fix? I tried a PNG with transparency from Google image search and it worked.

@bdef
Copy link
Author

bdef commented May 23, 2016

Failing pic is here http://d1vmz9r13e2j4x.cloudfront.net/NET/images/net_logo_black.png

@ProfOak
Copy link
Owner

ProfOak commented May 24, 2016

Thanks for that. I'll definitely hold onto this image for testing purposes.

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