Javascript Aviary WEB API保存高分辨率问题

Javascript Aviary WEB API保存高分辨率问题,javascript,html,api,aviary,Javascript,Html,Api,Aviary,我正在为照片编辑器在线使用Aviary API。直到现在,我才开始工作,以保存文件,但我不能让它工作,以保存文件的高分辨率。 另外,我联系了鸟舍,他们对我的API做了一些修改 这是我的代码: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <!-- Load Feather

我正在为照片编辑器在线使用Aviary API。直到现在,我才开始工作,以保存文件,但我不能让它工作,以保存文件的高分辨率。 另外,我联系了鸟舍,他们对我的API做了一些修改

这是我的代码:

   <!DOCTYPE html>
    <html>
    <head>
      <meta charset="UTF-8">
      <title></title>
      <!-- Load Feather code -->
      <script type="text/javascript" src="http://feather.aviary.com/js/feather.js"></script>
      <script src="http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/md5.js"></script>

      <!-- Instantiate Feather -->
      <script type='text/javascript'>
       var tool = ['enhance', 'effects', 'frames', 'orientation', 'focus', 'resize', 'crop', 'warmth', 'brightness', 'contrast', 'saturation', 'sharpness', 'colorsplash', 'draw', 'text', 'redeye', 'whiten', 'blemish'];

       var ts = Math.round((new Date()).getTime() / 1000);

       var hash = CryptoJS.MD5("MY API", "API SECRET", ts, guid());

       function guid() {
        function _p8(s) {
          var p = (Math.random().toString(16)+"000000000").substr(2,8);
          return s ? "-" + p.substr(0,4) + "-" + p.substr(4,4) : p ;
        }
        return _p8() + _p8(true) + _p8(true) + _p8();
      }

      var featherEditor = new Aviary.Feather({
       apiKey: 'MY API',
       apiVersion: 3,
           theme: 'dark', // Check out our new 'light' and 'dark' themes!
           tools: tool,
           appendTo: 'injection_site',
           language: 'en',

           timestamp: ts,
           salt: guid(),
           encryptionMethod: 'md5',
           signature: hash,
           hiresUrl: 'http://i.imgur.com/KTH5RwX.jpg',

           onSaveButtonClicked: function(imageID, newURL) {
             var img = document.getElementById(imageID);
             img.src = newURL;
             featherEditor.saveHiRes();
             return false;

           },
           onError: function(code, msg) {
            alert(code);
          }
        });

      function launchEditor(id, src) {
       featherEditor.launch({
         image: id,
         url: src,
       });
       return false;
     }
   </script>
 </head>
 <body>
  <div id='injection_site'></div>

  <img id='image1' src='http://i.imgur.com/KTH5RwX.jpg'/ width="600" height="800">

  <!-- Add an edit button, passing the HTML id of the image and the public URL of the image -->
  <p><input type='image' src='http://images.aviary.com/images/edit-photo.png' value='Edit photo' onclick="return launchEditor('image1', 'http://i.imgur.com/KTH5RwX.jpg');" /></p>

</body>
</html>

var-tool=[‘增强’、‘效果’、‘帧’、‘方向’、‘焦点’、‘调整大小’、‘裁剪’、‘温暖’、‘亮度’、‘对比度’、‘饱和度’、‘锐度’、‘色斑’、‘绘制’、‘文本’、‘红眼’、‘变白’、‘瑕疵’];
var ts=Math.round((new Date()).getTime()/1000);
var hash=CryptoJS.MD5(“我的API”,“API机密”,ts,guid());
函数guid(){
功能(第8页){
var p=(Math.random().toString(16)+“000000000”).substr(2,8);
返回s?”-“+p.substr(0,4)+”-“+p.substr(4,4):p;
}
返回p8()+p8(true)+p8(true)+p8();
}
var featherEditor=新鸟舍。羽毛({
apiKey:“我的API”,
版本:3,,
主题:'黑暗',//查看我们新的'光明'和'黑暗'主题!
工具:工具,
附录:'注射部位',
语言:"en",,
时间戳:ts,
salt:guid(),
encryptionMethod:'md5',
签名:hash,
招聘网址:'http://i.imgur.com/KTH5RwX.jpg',
onSaveButtonClicked:函数(imageID,newURL){
var img=document.getElementById(imageID);
img.src=newURL;
saveHiRes();
返回false;
},
onError:函数(代码、消息){
警报(代码);
}
});
函数启动编辑器(id,src){
羽化器({
图片:id,,
网址:src,
});
返回false;
}


您缺少onSaveHiRes函数,您正在onSaveButtonClicked中调用该函数