aviary 線上免費 圖片編輯 API
1. 基本簡介 https://developers.aviary.com/
2. 註冊 https://developers.aviary.com/signup
3.參考文件 https://developers.aviary.com/docs/web/setup-guide
4. 建立api key
5. Sample code
6.把key放進去就可以用了
2. 註冊 https://developers.aviary.com/signup
3.參考文件 https://developers.aviary.com/docs/web/setup-guide
4. 建立api key
5. Sample code
<!-- Load Feather code -->
<script type="text/javascript" src="http://feather.aviary.com/js/feather.js"></script>
<!-- Instantiate Feather -->
<script type='text/javascript'>
var featherEditor = new Aviary.Feather({
apiKey: 'your-key-here',
apiVersion: 3,
theme: 'dark', // Check out our new 'light' and 'dark' themes!
tools: 'all',
appendTo: '',
onSave: function(imageID, newURL) {
var img = document.getElementById(imageID);
img.src = newURL;
},
onError: function(errorObj) {
alert(errorObj.message);
}
});
function launchEditor(id, src) {
featherEditor.launch({
image: id,
url: src
});
return false;
}
</script>
<div id='injection_site'></div>
<img id='image1' src='http://images.aviary.com/imagesv5/feather_default.jpg'/>
<!-- 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://images.aviary.com/imagesv5/feather_default.jpg');" /></p>
6.把key放進去就可以用了