-
Notifications
You must be signed in to change notification settings - Fork 126
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
canvas.toDataURL doesn't respect stencil #23
Comments
Hello, @andreasvirkus! First of all, thanks for so detailed the issue description. Unfortunately, it's not possible by the means of this library, because the stencil just defines the rectangle area that will be cropped. Moreover, it's pretty often practice to crop a square by the circle stencil. But you can anyway process a rectangle canvas to get the needed result (if you want to use this method, test it on different browsers before to use one in production): |
Well, that seems to work perfectly! 馃帀 Thank you so much, my canvas-fu was too weak for this |
You are welcome! |
This is great content, please add it to the document if you can. It will save people like me tons of time digging the old issues. |
@yellow1912 , I will try to think out how to place it in the documentation, taking into account that the mentioned issues are still edge cases. |
Hi, thanks for an awesome component! The docs are great and the component is very easy to use 馃挴
I have an issue with calling
with both the default
CircleStencil
and the advanced stencil example. The result is always a rectangle with full corners.I've also created a replication here:
https://codesandbox.io/s/vue-sc4k6
My current workaround is to apply a small border radius to the image that displays the result, but ideally (especially with maybe changing the stencil in the future), I'd like a way to get the image cropped by the stencil 馃檹
The text was updated successfully, but these errors were encountered: