Adobe Creative SDK - 基于 Web 的图像编辑器



>有人使用过Adobe Creative SDK吗? 我注册了我的网站并收到了 api 密钥并插入了我的网页。 它非常简单,基本上复制他们的示例并使用我自己的图像,除了我不断收到以下错误:

"加载提供给'url'配置键的图像 URI 时出现问题。 请验证 URI 是否可公开访问,以及图像是否为受支持的格式。

我检查了Adobe网站,但没有运气,我正在使用一个354 x 384的小图像。

法典:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Aviary Test</title>
<!-- Load Feather code -->
<script type="text/javascript" src="http://feather.aviary.com/imaging/v3/editor.js"></script>
<!-- Instantiate Feather -->
<script type='text/javascript'>
var featherEditor = new Aviary.Feather({
apiKey: 'MY KEY',
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>
</head>
<body>
<div id='injection_site'></div>
<img id='image1' src='desert.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', 'Desert.jpg');" /></p>
</body>
</html>

我遇到了同样的问题。

一切正常,但是当您尝试从其他位置加载图像时,您会收到"加载提供给'url'配置键的图像 uri 时出现问题"错误。

我的网站如下所示:

  • 完整(全尺寸图像文件夹)
  • 拇指(文件夹)
  • 索引.html

您可以在此处看到错误:http://koffid.nl/memetests/sdk2/

当您使用"编辑照片"按钮时,该按钮使用指向图像的外部URL,它可以工作。当您单击使用我的文件结构而不是按钮的图像时,会出现错误。

所以这不起作用:

<img id='image1' src='thumb/feather_thumb.jpg' value='Edit photo' onclick="return launchEditor('image1', 'full/feather_default.jpg');" /></p>

这确实有效:

<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>

不能使用相对网址,需要传递图片的完整网址,即 http://example.com/images/myimage.jpg

最新更新