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

Add web support #47

Closed
jayu opened this issue Nov 16, 2019 · 1 comment
Closed

Add web support #47

jayu opened this issue Nov 16, 2019 · 1 comment

Comments

@jayu
Copy link
Contributor

jayu commented Nov 16, 2019

Feature Request

Add web support

Why it is needed

Make module cross-platform

Possible implementation

Hey, I made an investigation on how to implement .cropImage on the web.
In general, a solution could use canvas with 2d context and use drawImage (https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage) method to prepare cropped Image, then I could be returned to the user. And here my doubts started.

For native platforms, the return value is URI to a local image which is a result of transformation.
On the web is actually handier and easier to implement if a function would return

In addition, some users may experience issues with CORS when resizing will be implemented using canvas https://blog.codepen.io/2013/10/08/cross-domain-images-tainted-canvas/

I would like to start a discussion on the topic of web support.
Personally I'm not sure if this feature is really needed.

@retyui
Copy link
Collaborator

retyui commented Feb 5, 2024

Web support was added in 3.2.0

@retyui retyui closed this as completed Feb 5, 2024
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