Code: Select all
do "Tesseract.recognize('https://i.ibb.co/6NK7gmV/mtncode.png','eng',{ logger: m => console.log(m)}).then(({ data:{ text }}) => { liveCode.creditLoad(text)});" in widget "Browser"
With the codes below I want to export a snapshot from livecode and pass it to the tesseract api. I encoded the image and passed it to the image parameter of the tesseract api but it didnt work.
Code: Select all
export snapshot from rect (the rect of graphic "credit") of this card to tImageVariable as PNG
put base64Encode(tImageVariable) into gImageVariable
do "Tesseract.recognize(" & quote & "data:image/png;base64," & gImageVariable & quote & ",'eng',{ logger: m => console.log(m)}).then(({ data:{ text }}) => { document.write(text)});" in widget "Browser"