嗨,我正在开发一个在服务器上显示动态生成图像的应用程序。为了获取图像(在我们的例子中为png),应用程序使用Ajax请求。检索到的数据如下所示:
"?PNG
IHDRLXx?s
sBIT|d? pHYsaa???i IDATx???w|U?????~?{BI(?H/?4AaeQQp?>?n?]W??"?W?~t???uuW]?""R)RBI ????w~?;)7 I??.................................
..........................................."
Run Code Online (Sandbox Code Playgroud)
看起来像这样:
在我的应用程序中,我有一个Text:image,我想在其中显示图像,但是我不知道该怎么做。有人知道吗?
这里是ajax请求代码。
Ext.Ajax.request({
url: 'http://localhost/my_url/you_dont_need_to_know_this',
success: function(response){
//img.setData(response.responseText); //img is a Ext:image component.
debugger;
},
scope: this
Run Code Online (Sandbox Code Playgroud)
});