Sample 4.1: A single file input
一、定义
示例4.1:单个文件输入
此示例API调用将从Example.psd输入中请求两个不同的输出表示形式:
Example.jpeg是一个新的JPEG格式,宽度为512像素Example.png是新的全尺寸PNG格式
curl -X POST \
https://image.adobe.io/pie/psdService/renditionCreate \
-H 'Authorization: Bearer <auth_token>' \
-H 'Content-Type: application/json' \
-H 'x-api-key: <YOUR_API_KEY>' \
-d '{
"inputs":[
{
"href":"<SIGNED_GET_URL>",
"storage":"external"
}
],
"outputs":[
{
"href":"<SIGNED_POST_URL1>",
"width": 512,
"storage":"external",
"type":"image/jpeg"
},
{
"href":"<SIGNED_POST_URL2>",
"storage":"external",
"type":"image/png"
}
]
}'
关于<SIGNED_GET_URL>怎么传我目前还不清楚.
Input and Output file storage
Clients can use assets stored on one of the following storage types: External: AWS S3: By using a presigned GET/PUT URL Azure: By generating a SAS (Shared Access Signature) for upload/download Dropbox: Generate temporary upload/downl

本文介绍了一个使用Adobe API进行图片格式转换的例子,包括从PSD文件生成JPEG和PNG格式的图片。通过C++实现API调用,并展示了如何构建请求头、设置请求参数等关键步骤。
最低0.47元/天 解锁文章
1231





