05-03-2019, 10:10 PM
@redbull2k @kevin
Still having problems with the output, indicating that the image format is incorrect.
Macro Macro3
Still having problems with the output, indicating that the image format is incorrect.
Macro Macro3
typelib WinHttp {662901FC-6951-4854-9EB2-D9A2570F2B2E} 5.1
WinHttp.WinHttpRequest r._create
r.Open("POST" F"https://aip.baidubce.com/rest/2.0/ocr/v1/general_basic")
r.setRequestHeader("content-type", "application/x-www-form-urlencoded")
str ss.getfile("$desktop$\1.png");; change to file location
_s.encrypt(4 ss "" 2)
;;;have problem with the output, indicating that the image format is incorrect.
;_s-"access_token=24.b305c9822131e65eda05e29c157dd719.2592000.1559103982.282335-16139329&image="
;_s+"&language_type=CHN_ENG&probability=true&detect_direction=true"
;mes _s
;;;have problem with the output, indicating that the image format is incorrect.
str body=F"access_token=24.b305c9822131e65eda05e29c157dd719.2592000.1559103982.282335-16139329&image={_s}&language_type=CHN_ENG&probability=true&detect_direction=true"
mes body
r.Send(body)
ARRAY(byte) a=r.ResponseBody
str s.fromn(&a[0] a.len)
IXml x=JsonToXml(s 1)
IXmlNode ro=x.Path("root/words_result/item/words")
str v1=ro.Value
mes v1