Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 webview 的 html 中将 imageview.toImage() 设置为 img src 的任何想法。
假设我有一个 imageview(其中有一些图像)。好吧 imageview.toimage() 被视为钛中的图像对象。现在我需要的是我想设置
webview.html='<html><img src="here i want to put obove imageview.toimage()"></html>';
我尝试了很多方法,任何人都有经验,请指导我。
问候:阿里
将其保存到文件并分配文件的 url 路径或 base64Encode 图像并将其作为 src 参数的值提供
您可能会尝试将图像转换为 base64 blob 文本并将其用作 css 背景图像数据:
background-image:url('data:image/png;base64,'+Ti.Utils.base64encode(imageview.toImage()).getText()+'\');