- Log in to post comments
User bio
404 bio not found
Member since Apr 19, 2021
Posts:
Replies:
Open Exchange applications:
Certifications & Credly badges:
Huicai has no Certifications & Credly badges yet.
Followers:
Huicai has no followers yet.
Following:
Huicai has not followed anybody yet.
1. 通过%NetRequest类获得图片
2. 通过下面方法得到图片的Base64流
ClassMethod Img2Base64(imgDataStream) As %Stream.GlobalCharacter{ Set sgc = ##class(%Stream.GlobalCharacter).%New() set byteList = imgDataStream.Read(12288) while(byteList'=""){ set baseStr = ##class(%SYSTEM.Encryption).Base64Encode(byteList)do sgc.Write(baseStr) set byteList = "" set byteList = img.Read(12288) } do imgDataStream.%Close() set imgDataStream="" quit sgc}