在线编辑图片(转)

简介: 阅读目录 1 效果图 2 实现 3 参数介绍 4 官方文档 一个免费的图片编辑SDK,可用于web,ios,android平台。本文主要介绍web端使用方法。   回到顶部 1 效果图 点击 “Edit Photo” 按钮, 查看效果图       回...

一个免费的图片编辑SDK,可用于web,ios,android平台。本文主要介绍web端使用方法。

 

1 效果图

点击 “Edit Photo” 按钮, 查看效果图

 

image

 

 

2 实现

复制下面代码,保存为html文件

 

 
 
"http://www.w3.org/1999/xhtml">
"server"> 
"Content-Type" content=
"text/html; charset=utf-8"/> 
    
  
   
    
    
 
 
    
"form1" runat= "server">
   
'injection_site'>
'image1' src='https://img.alicdn.com/imgextra/i2/62935302/TB2hBzSeXXXXXbMXXXXXXXXXXXX_!!62935302.jpg'/>
 
 
 

'image' src='' value='Edit photo' onclick="return launchEditor('image1', 'https://img.alicdn.com/imgextra/i2/62935302/TB2hBzSeXXXXXbMXXXXXXXXXXXX_!!62935302.jpg');" />

 
    
 
 

 

作者:疯吻IT 出处:http://fengwenit.cnblogs.com

3 参数介绍

apiKey

所有的工具

            tools: 'text,resize',//这里设置为all,可以显示所有的工具;如果只想显示部份工具,可以用逗号分隔

所有工具如下:

  • enhance: Autocorrect your photo with one of five basic enhancements.

  • effects: Choose from a variety of effects and filters for your photo.

  • frames: Choose from a variety of frames to apply around your photo.

  • overlays: Choose from a variety of overlays to apply over your photo.

  • stickers: Choose from a variety of stickers you can resize and place on your photo.

  • orientation: Rotate and flip your photo in one tool.

  • crop: Crop a portion of your photo. Add presets via API. Fixed-pixel cropPresets perform a resize when applied.

  • resize: Resize the image using width and height number fields.

  • lighting: Adjust the lighting in your photo with this collection of adjustment toools.

  • color: Adjust the color in your photo with this collection of adjustment toools.

  • sharpness: Blur or sharpen the overall image in one tool.

  • focus: Adds a selective linear or radial focus to your photo.

  • vignette: Adds an adjustable vignette to your photo.

  • blemish: Remove skin blemishes with a brush.

  • whiten: Whiten teeth with a brush.

  • redeye: Remove redeye from your photo with a brush.

  • draw: Add doodle overlays with a brush.

  • colorsplash: Use a smart brush to colorize parts of your photo which becomes grayscale otherwise.

  • text: Add custom, resizable text.

  • meme: Turn your photo into a meme with this tool that adds text to the top and bottom of your photo.

 

默认展开的工具


            initTool: 'text',//默认展开的工具

 

语言

            language: 'zh_HANS',//简体中文

默认en 为英语

  

保存

            onSave: function (imageID, newURL) {

                //alert(newURL);

                $.ajax({

                    url: "ashx/CarInfo.ashx?type=DownloadCarPhoto&imgUrl=" + newURL + "&rand=" + Math.random(),

                    success: function (url) {

                        alert('保存成功');

                        var img = document.getElementById(imageID);

                        img.src = url;

                    },

                    error: function () {

                        alert('error')

                    }

                });

            },

     

4 官方文档

 

在线系列

http://www.cnblogs.com/fengwenit/p/4738260.html

 

相关文章
|
JSON 缓存 Android开发
iOS高质量的动画实现解决方案——Lottie
iOS高质量的动画实现解决方案——Lottie
1400 0
|
4月前
|
存储 监控 搜索推荐
小红书笔记视频详情接口解析与实战指南
小红书笔记视频详情接口(smallredbook.item_get_video)提供视频元数据、内容解析、用户画像及电商赋能能力,支持商品监控、推荐优化等场景。合规调用可提升内容营销效果。
|
10月前
|
机器学习/深度学习 人工智能 自然语言处理
《鸿蒙Next的AI声音修复功能:多类型音频处理的卓越表现》
鸿蒙Next的AI声音修复功能针对不同类型的音频文件提供卓越的处理效果。对于语音类音频,它能显著提升发音清晰度和可懂度,改善交流质量;音乐类音频则通过优化音质和增强细节,还原原始情感;环境音类音频中,AI有效去除背景噪音,提取纯净自然声音;对特殊格式如MIDI,先转换为实际音频再进行优化。总体而言,该功能根据不同音频特点进行针对性修复,全面提升用户体验。
769 62
|
移动开发 前端开发 JavaScript
基于 HTML5 和 Canvas 开发的在线图片编辑器
基于 HTML5 和 Canvas 开发的在线图片编辑器
390 0
|
Web App开发 前端开发 安全
如何用JAVA如何实现Word、Excel、PPT在线前端预览编辑?
随着信息化的发展,在线办公也日益成为了企业办公和个人学习不可或缺的一部分,作为微软Office的三大组成部分:Word、Excel和PPT也广泛应用于各种在线办公场景,但是由于浏览器限制及微软Office的不开源等特性,导致Word、Excel和PPT在在线办公很难整合到自己公司的OA或者文档系统。
1025 99
|
人工智能 IDE 开发工具
给IntelliJ IDEA添加AI功能
这篇文章讲解了如何在IntelliJ IDEA中安装和使用阿里云开发的通义灵码插件,以增强IDE的人工智能辅助编程功能。
4186 0
给IntelliJ IDEA添加AI功能
|
ARouter Android开发 容器
现代化 Android 开发:多 Activity 多 Page 的 UI 架构
本文为现代化 Android 开发系列文章第四篇。
4789 57
|
移动开发 前端开发 rax
开放下载!1500页,40万字,淘系技术2020总结黑皮书来了
作为阿里巴巴新零售技术的王牌军,基于淘系丰富的商业和业务形态,淘系技术在大前端、音视频、端智能、用户增长、客户端架构、服务端架构、云原生、技术质量以及AI等技术领域有着丰富的思考和沉淀。淘系技术将2020一整年的精华内容梳理合并,重磅推出《技术人的百宝黑皮书》,本文从前沿技术、职场成长经验及学习问答、技术人必读书单、淘系经典开源项目以及2020淘系顶会paper等五个方面进行简要介绍。
开放下载!1500页,40万字,淘系技术2020总结黑皮书来了
|
移动开发 安全 数据安全/隐私保护
iOS代码混淆工具
🔒 这是一篇介绍iOS代码混淆工具的技术博客,旨在帮助开发者提高代码安全性。本工具来自于Github的混淆词库和代码,通过差异化处理和代码合并生成数亿种用于混淆的单词和垃圾代码,确保每次混淆不会出现重复,混淆后的代码跟手写没有任何区别,完美解决代码4.3和2.3.1问题。
|
Web App开发 数据采集 人工智能