根據影像的背景顏色或透明度返回影像的裁剪區域。
語法
IpsAdmin
IpsCompanyAdmin
IpsUser
ImagePortalAdmin
ImagePortalUser
ImagePortalContrib
ImagePortalContribUser
輸入(getAutoCropRectParam)
在調用此方法時指定autoColorCropOptions或autoTransparentCropOptions。
名稱 | 類型 | 必要 | 說明 |
---|---|---|---|
公司句柄 | xsd:string |
是 | 要使用資產的公司的句柄。 |
資產句柄 | xsd:string |
是 | 要使用的資產的句柄。 |
自動顏色裁剪選項 | types:AutoColorCropOptions |
否 | 根據顏色計算裁剪矩形。 請參閱 自動顏色裁剪選項。 |
autoTransparentCropOptions | types:AutoTransparentCropOptions |
否 | 根據透明度計算裁剪矩形。 請參閱 自動透明裁剪選項。 |
輸出(getAutoCropRectReturn)
名稱 | 類型 | 必要 | 說明 |
---|---|---|---|
x偏移 | xsd:int |
是 | 計算裁剪區域的起始左像素坐標。 |
y偏移 | xsd:int |
是 | 計算的裁剪區域的起始頂像素坐標。 |
寬度 | xsd:int |
是 | 計算的裁剪區域的寬度(以像素為單位)。 |
高度 | xsd:int |
是 | 計算的裁剪區域的高度(以像素為單位)。 |
請求
<getAutoCropRectParam xmlns="http://www.scene7.com/IpsApi/xsd/2012-07-31-beta">
<companyHandle>c|3578</companyHandle>
<assetHandle>a|3192146</assetHandle>
<autoColorCropOptions>
<corner>UpperLeft</corner>
<tolerance>0.5</tolerance>
</autoColorCropOptions>
</getAutoCropRectParam>
回答
<getAutoCropRectReturn xmlns="http://www.scene7.com/IpsApi/xsd/2012-07-31-beta">
<xOffset>452</xOffset>
<yOffset>66</yOffset>
<width>1271</width>
<height>1874</height>
</getAutoCropRectReturn>