博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Adobe出品(支持IOS,android,web调用)免费插件编辑图片
阅读量:4694 次
发布时间:2019-06-09

本文共 1485 字,大约阅读时间需要 4 分钟。

<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: '3092928019@qq.com',//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' οnclick="return launchEditor('image1', 'img/cloud.jpg');" /></p>
   </form>
 </body>

 

转载于:https://www.cnblogs.com/weimingxin/p/8966488.html

你可能感兴趣的文章
leetcode133 - Clone Graph - medium
查看>>
Mybatis(一)入门
查看>>
DDR工作原理(转)
查看>>
(Frontend Newbie) Web三要素(一)
查看>>
(转载-学习)python wsgi 简介
查看>>
QPushButton 控制两种状态
查看>>
一点小基础
查看>>
PHP 自动加载类 __autoload() 方法
查看>>
JDK中的Timer和TimerTask详解(zhuan)
查看>>
【python练习】ATM&购物商城程序
查看>>
nginx 日志问题(\x22)
查看>>
装饰器、迭代器、生成器
查看>>
类对象作为类成员
查看>>
面向对象和面向过程的区别及优劣对比详解
查看>>
const与指针
查看>>
thsi指针的一些用法及作用
查看>>
c++友元
查看>>
c++运算符重载
查看>>
一元运算符重载
查看>>
Windows 远程栈溢出挖掘
查看>>