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

32-bit PNG -> gif conversion has poor alpha handling #190

Closed
lilith opened this issue Jul 3, 2018 · 1 comment
Closed

32-bit PNG -> gif conversion has poor alpha handling #190

lilith opened this issue Jul 3, 2018 · 1 comment
Assignees

Comments

@lilith
Copy link
Member

lilith commented Jul 3, 2018

Run the demo server, then try these:

http://localhost:39876/demo_images/sun_256.png?format=gif
http://localhost:39876/demo_images/sun_256.png?format=jpg
sun_256
sun_256

It looks like there's no thresholding for alpha conversion (or something like that). For jpeg I can force a background color, but for GIF I think we should be able to do something smarter.

@lilith
Copy link
Member Author

lilith commented Jul 3, 2018

I'm also thinking that it may be more correct to blend the background color immediately prior to encoding. Currently this happens during image scaling (for speed), but prior to image filters being applied. Since one of those filters is alpha adjustment, the current approach doesn't fully solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants