Aliasing issue when resizing on 32-bit systems
See original GitHub issueFirst, thanks for the awesome work you did with Sharp ! 👍
I have a question (I don’t think it is a bug) regarding the resize function. My code looks like this :
const outputImage = sharp(imagePath);
outputImage
.resize(Number(width), Number(height))
.max();
When I run it on my Windows machine, the resized image is perfectly fine, without aliasing.
When I run it on a Debian 8 machine, it generates the following image :
Source image :
Output with size 350x350 (the “bug” happens) :
Output with size 351x351 (perfectly fine) :
It seems to have this behaviour only with some “round” numbers and only on my Debian server, not on Windows.
Any help would be much appreciated. Thanks !
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Chapter 9. Known Issues - Nvidia
Although some systems will run perfectly fine when cache aliasing occurs, ... If the BIOS does place any NVIDIA PCI I/O regions above...
Read more >376850 - Aliasing on Chrome icon - chromium - Monorail
Steps to reproduce the problem: 1. Open Chrome on Windows. 2. Look at the status bar (bottom right). What is the expected behavior?...
Read more >Keeping Your Renders Clean - FXGuide
Some deal with color purity issues, some scaling and resizing issues, while others take a look at image degradation over multiple ...
Read more >Issue 376850 in chromium: Aliasing on Chrome icon - Google Groups
Issue 376850 in chromium: Aliasing on Chrome icon ... Labels: Cr-UI Pri-2 Via-Wizard Type-Bug OS-Windows New issue 376850 by ... NET to resize...
Read more >1.0.6: Aliasing when resizing - Pixelmator Community
This seems to be a new issue with 1.0.6. In the original Pixelmator, in Photoshop, and in previous versions of Pixelmator Pro, it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks a lot for these tips. You were almost right and pointed me in the right direction. I had to follow libvips docs to “build with the GCC auto-vectorizer and diagnostics (or just -O3)” (from here : https://github.com/jcupitt/libvips) :
It worked with these params. Maybe you could add this tip in Sharp docs if someone faces the same issue.
For information I tried enabling “simd” first but it didn’t work.
Again, thanks a lot for the time you give to the community, you are awesome and Sharp is amazing 😃
Enabling simd might help too as that will keep the floating-point reduction away from the x87 FPU.