Skip to content

Commit

Permalink
增加对base64图片的支持
Browse files Browse the repository at this point in the history
比如上传预览的图片,src是一个base64的字符串,需要增加这个支持
  • Loading branch information
NeoGuo committed Jun 13, 2015
1 parent 9781580 commit 1365b57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/egret/display/Texture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ module egret {
var winURL = window["URL"] || window["webkitURL"];
if (Texture._bitmapCallbackMap[url] == null) {//非正在加载中
Texture._addToCallbackList(url, callback);
if (url.indexOf("http:") != 0 && url.indexOf("https:") != 0 && (Browser.getInstance().isIOS() && parseInt(Browser.getInstance().getIOSVersion().charAt(0)) >= 7) && winURL) {
if (url.indexOf("data:") != 0 && url.indexOf("http:") != 0 && url.indexOf("https:") != 0 && (Browser.getInstance().isIOS() && parseInt(Browser.getInstance().getIOSVersion().charAt(0)) >= 7) && winURL) {
var xhr = new XMLHttpRequest();
xhr.open("get", url, true);
xhr.responseType = "blob";
Expand Down Expand Up @@ -411,4 +411,4 @@ declare module egret_native {

function removeTexture(filePath:string):void;
}
}
}

0 comments on commit 1365b57

Please sign in to comment.