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

Disable image smoothing algorithm #1131

Open
EricKrief opened this issue Jan 9, 2024 · 3 comments
Open

Disable image smoothing algorithm #1131

EricKrief opened this issue Jan 9, 2024 · 3 comments

Comments

@EricKrief
Copy link

I've noticed when I zoom in a lot, that the image does not get pixelated.
I'm guessing you are using some kind of image smoothing algorithm.

Is there a way to cancel this algorithm? I actually want the image to pixelate when zooming in enough.

@fengyuanchen
Copy link
Owner

For v1, try this:

cropper.getCroppedCanvas({
  imageSmoothingEnabled: false,
});

@EricKrief
Copy link
Author

Doesn't seem to make any difference. The image is still not pixelated.
Any other ideas?

@fengyuanchen
Copy link
Owner

I have no idea about this, please reference the CanvasRenderingContext2D: drawImage() method.

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

No branches or pull requests

2 participants