Expand my Community achievements bar.

SOLVED

image cropping

Avatar

Level 4

Hi,

 

Is it possible to apply a crop to a copped image. eg I have an image which when I load onto a page will create multiple versions of that image with different aspect ratios large, medium, small, thumbnail. 

What I would like to happen is when when I cropped the main image using the image component tool I want to be able to apply the aspects for the large, medium, small image to the newly cropped main image.

1 Accepted Solution

Avatar

Correct answer by
Level 10
5 Replies

Avatar

Correct answer by
Level 10

See this AEM topic -- it discusses cropping:

http://dev.day.com/docs/en/cq/current/dam/dam_documentation.html#Editing Images

HTH

Avatar

Level 4

Hi,

 

Thanks for the reply but I meant programmatically through Image API and ImageResource API

 

Chris 

Avatar

Level 10

OK - i will see if i can dig up some code examples for you. This is a good use case too that we will add to the community list of community articles. We are also workgin on a community GitHub where we will start populating with useful code for our AEM community. 

Avatar

Level 10

Image crop just stores the aspet properties and does not recreate an image. Why don;t you crop original image has per your need at first place only

Avatar

Level 4

How,

 

Do I use that as a source for different child images?

 

I have a parent image which all my child images are generated from. Each child image uses the parent image as source and applies their own aspect ratio to achieve the desired result. If I were to then crop the parent image each child is to then use the cropped version and again applied the aspect ratios. I am having problem with using the crop parent image as source as all child images seem to refer to the uncropped parent image as source.

Chris