From 7d44a17ac0a6039d332712acc91d7a972153a015 Mon Sep 17 00:00:00 2001 From: 移动系统liao <liaoxujun@qq.com> Date: 星期一, 19 八月 2024 14:12:19 +0800 Subject: [PATCH] no message --- cylsg/EzTencentCloud/TencentCloudService.cs | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/cylsg/EzTencentCloud/TencentCloudService.cs b/cylsg/EzTencentCloud/TencentCloudService.cs index b192d1f..aa364a0 100644 --- a/cylsg/EzTencentCloud/TencentCloudService.cs +++ b/cylsg/EzTencentCloud/TencentCloudService.cs @@ -117,6 +117,45 @@ } + + + + public BizLicenseOCRResponse BizLicenseOCR(string ImageBase64) + { + try + { + + Credential cred = new Credential + { + SecretId = App.Configuration["TencentCloud:SecretId"] ?? "AKIDIPFp9CyThfMmvoQlpeCl34pKYVBahY9T", + SecretKey = App.Configuration["TencentCloud:SecretKey"] ?? "4rNcaHhrkMhmb9QQ9bmgKipfFZcOt86n" + }; + + ClientProfile clientProfile = new ClientProfile(); + HttpProfile httpProfile = new HttpProfile(); + + + httpProfile.Endpoint = ("ocr.tencentcloudapi.com"); + clientProfile.HttpProfile = httpProfile; + + var _ocrClient = new OcrClient(cred, "ap-chengdu", clientProfile); + + var ret = _ocrClient.BizLicenseOCRSync(new BizLicenseOCRRequest() + { + ImageBase64 = ImageBase64, + }); + + return ret; + } + catch (Exception) + { + throw; + } + + + } + + #endregion #region iai 浜鸿劯璇嗗埆 -- Gitblit v1.9.1