Image Becomes Blurry When Resized Using Corner Scaling in Fabric.js 6.4.2 with Angular. #10323
Unanswered
Arkit-Sutariya
asked this question in
Q&A
Replies: 1 comment 7 replies
-
Canvas uses nearest neighbour scaling for images and when a strong scaling factor is applied it looks like that. Try to look at this demo for example (ooofff is currently broken going to fix the demo shortly) |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on an Angular project and using Fabric.js version 6.4.2. I am adding an image from our server to the Fabric.js canvas. The image displays perfectly and looks clean initially. However, when I resize the image using the corner scaling controls to make it smaller, it becomes blurry, and the borders exhibit a zig-zag visual effect.
I have created a minimal reproducible example on CodeSandbox, which you can access here.
Question:
1. Is this issue related to Fabric.js's image rendering or scaling functionality?
2. Could this be due to the quality of the server image itself?
3. What are the best practices or recommended settings in Fabric.js to avoid such issues during scaling?
I would appreciate guidance on whether this is a Fabric.js-specific issue or something related to the source image, along with suggestions to resolve the problem.
Thank you!
Here is default load image.

After size from corner

Beta Was this translation helpful? Give feedback.
All reactions