コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

Crop command customizations

Avatar

Level 1

Hi,

 

we are migrating custom transformers to image presets in DM. However for crop operation we have been using quite custom algorithm that was taking into consideration initial asset layer when calculating rectangle to crop:

 

        int lengthPx;
        if (lengthStr.endsWith("%")) {
            String percentageStr = lengthStr.substring(0, lengthStr.length() - 1);
            double percentage = Double.parseDouble(percentageStr);
            lengthPx = (int)Math.round(percentage / 100.0D * (double)layerLength);
        } else {
            lengthPx = Integer.parseInt(lengthStr);
        }

        return lengthPx;

 

 Is it somehow possible to achieve something like that in DM?

1 受け入れられたソリューション

Avatar

正解者
Community Advisor and Adobe Champion

Can you check if "Pixel Crop" adjust to what you need?, please take a look here: https://experienceleague.adobe.com/docs/experience-manager-65/developing/components/json-exporter-co... 



Esteban Bustamante

元の投稿で解決策を見る

1 返信

Avatar

正解者
Community Advisor and Adobe Champion

Can you check if "Pixel Crop" adjust to what you need?, please take a look here: https://experienceleague.adobe.com/docs/experience-manager-65/developing/components/json-exporter-co... 



Esteban Bustamante