I want to know if it’s possible to transfer an image from JS to the HTML5 Openfl application.
I need to make a web application where the user takes a screenshot from the webcam and then manipulates the image adding stuff on top of it.
The “webcam screenshot part” is going to be programed in JS, and the “image editing part” will be programmed in Haxe using OpenFL.
So I need to transfer the screenshot image from JS to the OpenFL Html5 application.
What I could investigate is that images in JS can be stored in the base64 format, Maybe I need to get the base64 variable from JS and then parse it into a ByteArray to convert it to BitmapData. Can someone point me in the right direction on how to do this?
Maybe this class is what I need? if yes how I should use it? Also should I get the data using ExternalInterface?