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

Embed sort function in Quant.c to get same results in Windows and Linux #5264

Closed
wants to merge 2 commits into from
Closed

Conversation

raygard
Copy link
Contributor

@raygard raygard commented Feb 12, 2021

Fixes #5263

Changes proposed in this pull request:

  • Embed sort in Quant.c in place of system qsort(). Avoids different results from different implementations of qsort() on different platforms.
  • quantize() and quantize2() can be static; they are not called outside Quant.c

src/libImaging/Quant.c Outdated Show resolved Hide resolved
src/libImaging/Quant.c Outdated Show resolved Hide resolved
src/libImaging/Quant.c Outdated Show resolved Hide resolved
@radarhere radarhere mentioned this pull request Feb 13, 2021
@raygard
Copy link
Contributor Author

raygard commented Feb 14, 2021

I hope it's OK I made one more formatting tweak -- removed an excess space character.
Thank you @radarhere for explaining the test approach.

@radarhere
Copy link
Member

You're free to keep making changes, it's your PR, that's fine.

src/libImaging/Quant.c Outdated Show resolved Hide resolved
@radarhere
Copy link
Member

I've created #5367 as an alternative to this. Let us know if you have any thoughts.

@raygard
Copy link
Contributor Author

raygard commented Apr 2, 2021

Closing this in favor of #5367 and #5374.

@raygard raygard closed this Apr 2, 2021
This pull request was closed.
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.

Image.resize() can give different results in Windows than in Linux
2 participants