Adobe出品(支援IOS,android,web調用)免費外掛程式編輯圖片

來源:互聯網
上載者:User

標籤:onclick   ons   NPU   web   var   turn   image   儲存   img   

<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>圖片編輯</title>
    <script src="js/jquery-1.7.2.js"></script>
    <script src="https://dme0ih8comzn4.cloudfront.net/js/feather.js"></script>
    <script type=‘text/javascript‘>
        //線上編輯圖片功能,第三方外掛程式,完全免費
        var featherEditor = new Aviary.Feather({
            apiKey: ‘[email protected]‘,//apikey可以免費申請,https://creativesdk.adobe.com/docs/web/#/index.html
            apiVersion: 3,
            theme: ‘dark‘, // Check out our new ‘light‘ and ‘dark‘ themes!
            tools: ‘all‘,//這裡設定為all,可以顯示所有的工具
            initTool: ‘text‘,//預設展開的工具
            language: ‘zh_HANS‘,//簡體中文
            appendTo: ‘‘,
            onSave: function (imageID, newURL) {

                alert(newURL);
                //$.ajax({
                //    url: "ashx/UserInfo.ashx?t=chAvatar&imgUrl=" + newURL + "&rand=" + Math.random(),
                //    success: function (url) {
                //        alert(‘儲存成功‘);
                //        var img = document.getElementById(imageID);
                //        img.src = url;
                //    },
                //    error: function () {
                //        alert(‘error‘)
                //    }
                //});

            },
            onError: function (errorObj) {
                alert(errorObj.message);
            }
        });
        function launchEditor(id, src) {
            featherEditor.launch({
                image: id,
                url: src
            });
            return false;
        }
</script>
</head>
<body>
    <form id="form1" runat="server">
     <div id=‘injection_site‘></div>
       <img id=‘image1‘ src=‘img/cloud.jpg‘/>
      <!-- Add an edit button, passing the HTML id of the image and the public URL of the image -->
      <p><input type=‘image‘ src=‘‘ value=‘Edit photo‘ onclick="return launchEditor(‘image1‘, ‘img/cloud.jpg‘);" /></p>
   </form>
 </body>

 

Adobe出品(支援IOS,android,web調用)免費外掛程式編輯圖片

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.