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

handle images scaled via CSS #5

Merged
merged 1 commit into from
Aug 6, 2021
Merged

Conversation

Munawwar
Copy link
Contributor

Currently if an image was scaled via CSS, the ctx.drawImage() call draws the image in its original dimension, but getImageData() gets the data in the CSS dimension. This disconnect results in a clipped image.

I've added code to allow canvas to auto-scale the image (if it has to).

@metafloor metafloor merged commit ecd98ca into metafloor:master Aug 6, 2021
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.

None yet

2 participants