Extract bitmap from screen for cropping tool: need canvas support

I’m writing an image crop tool. I want to send just the cropped image to the backend. This would be easy with canvas: put the image in canvas with the drawImage() function, then call toDataUrl('image/jpeg', 1.0). I.e. 5 lines of JavaScript.

I could use a port, but then I could never release this as a library. In Elm 0.18 libraries had access to native functions, which are gone too. I.e. Elm-Canvas is out of the question.

Is there any other method for me to extract a bitmap from the screen in Elm?

Maybe a web component will work for your use case?

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.