Left - Right cropping of image through workflow | Community
Skip to main content
rk39193348
Level 4
December 7, 2015
Solved

Left - Right cropping of image through workflow

  • December 7, 2015
  • 5 replies
  • 1006 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by edubey

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'

5 replies

edubey
edubeyAccepted solution
Level 10
December 7, 2015

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'

kautuk_sahni
Community Manager
Community Manager
December 7, 2015

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
rk39193348
Level 4
December 7, 2015

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

edubey
Level 10
December 7, 2015

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 

smacdonald2008
Level 10
December 7, 2015

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.