Sample 7.1 - Play ALL actions in .atn file.
一、定义
样本7.1-在.atn文件中播放所有动作
export token=<YOUR_TOKEN>
export api_key =<YOUR_API_KEY>
curl -H "Authorization: Bearer $token" -H "x-api-key: $api_key" https://image.adobe.io/pie/psdService/photoshopActions -d '{
"inputs": [
{
"href": "https://as2.ftcdn.net/jpg/02/49/48/49/500_F_249484911_JifPIzjUqzkRhcdMkF9GnsUI9zaqdAsn.jpg",
"storage": "external"
}
],
"options": {
"actions": [
{
"href": "https://raw.githubusercontent.com/johnleetran/ps-actions-samples/master/actions/Oil-paint.atn",
"storage": "external"
}
]
},
"outputs": [
{
"storage": "external",
"type": "image/jpeg",
"href": "https://some-presigned-url/output.jpeg"
}
]
}'
二、c++ 代码
#include <iostream>
#include <curl/curl.h>
#include <json/json.h>
#pragma warning(disable:4996)
using namespace std;
//#define API_TEST
wstring AsciiToUnicode(const string& str)
{
// 预算-缓冲区中宽字节的长度
int unicodeLen = MultiByteToWideChar(CP_ACP, 0, str.c_str(), -1, nullptr, 0);
// 给指向缓冲区的指针变量分配内存
wchar_t *pUni

本文介绍了一个使用 Adobe Photoshop API 播放 .atn 文件中所有动作的示例。通过 cURL 命令及 C++ 代码实现从远程位置加载图片和动作文件,并指定输出结果。
最低0.47元/天 解锁文章
2175

被折叠的 条评论
为什么被折叠?



