Expand my Community achievements bar.

SOLVED

Left - Right cropping of image through workflow

Avatar

Level 4

Hi All ,

I want to crop the image , if the image has "left" word , ex "a-left.jpg" then from the left portion image should be cropped based on some ratio. Can this be down through a workflow ? 

Please please suggest.

Regards

RK

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Yes it can be done via workflow. You can create a workflow launcher which executes on image upload.

Workflow launcher will execute a workflow which will do :

1. Read image name, if name has ' left'

2. Crop image based in your ration

3. Do not perform anything if image does not have 'left'

View solution in original post

5 Replies

Avatar

Correct answer by
Level 10

Hi,

Yes it can be done via workflow. You can create a workflow launcher which executes on image upload.

Workflow launcher will execute a workflow which will do :

1. Read image name, if name has ' left'

2. Crop image based in your ration

3. Do not perform anything if image does not have 'left'

Avatar

Administrator

Hi 

As mentioned by Praveen, you could achieve the desirable.

Community article, that can help you :- http://experience-aem.blogspot.com/2014/01/aem-cq-56-crop-images-in-workflow-step.html

//use the Dialog Participant Step and configure dialog with a CQ.html5.form.SmartImage widget. User selects crop co-ordinates; the next automated step in workflow reads crop numbers, crops the image and saves it as logo.png renditioon

 

I hope this would help you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

Avatar

Level 4

Hi , 

Can you please elaborate how to achieve this ??

Workflow launcher will execute a workflow which will do :

1. Read image name, if name has ' left'

2. Crop image based in your ration

3. Do not perform anything if image does not have 'left'

Thanks for your help

Avatar

Level 10

This [1] shows how you can configure to execute a workflow lanucher based on some conditions. 

The 3 point mentioned will be part of ImageCropStep class  in [2]

Create [2] workflow and setup a launcher

[1] https://docs.adobe.com/docs/en/cq/5-6-1/workflows/wf-using.html#Starting Workflows When Nodes Change

[2] http://experience-aem.blogspot.com/2014/01/aem-cq-56-crop-images-in-workflow-step.html 

Avatar

Level 10

Also watch Wills Webinair on Workflows (Ask the community experts from last march) - we cover using Launcher too:

https://helpx.adobe.com/experience-manager/using/Workflows.html

The link to the webinar is in the table in the start of the article.