【问题标题】:Titanium Appcelerator manipulate image with additional text and other imagesTitanium Appcelerator 使用附加文本和其他图像操作图像
【发布时间】:2011-10-23 14:56:51
【问题描述】:

我的问题与 Titanium Appcelerator Mobile 有关,我正在寻找开发应用程序并寻找最佳方法。我需要将图像作为电子邮件发送,但我首先要操作图像,但要放置文本或添加其他部分,例如嵌入的另一个图像。这可以做到吗?最好的方法是什么。我可以将其构建为 HTML 页面,然后另存为图像吗?有什么想法吗?

【问题讨论】:

    标签: titanium appcelerator


    【解决方案1】:

    您可以构建一个 HTML 页面,然后将其存储到图像中。

    Webview 有一个名为toImage 的函数。你可以使用它。

    还可以查看文档:http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.WebView-object

    将其包含在您的 HTML 中以使其适合屏幕。

    var html = '<html><head><meta name="viewport" content="initial-scale=1.0, width=device-width, height=device-height, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /></head><body>';
    var webview = Ti.UI.createWebView({html: html});
    var imageBlob = webview.toImage();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-10-13
      • 1970-01-01
      • 2012-11-02
      • 2012-06-20
      • 1970-01-01
      • 2012-01-03
      • 1970-01-01
      相关资源
      最近更新 更多