Hi All,
When we upload image in eDAM, Metadata Processor(com.day.cq.dam.core.process.MetadataProcessorProcess - CQ5 out of box workflow process) is extracting metadata details(image length and width.. etc) for the image.
Is it possible to get aspect ratio or height or width for the video when we upload video in eDAM ?
Thanks
Sankar
Solved! Go to Solution.
Hi
I am not sure if this would help you.
But you can try, the AssetDetails class to get the details of a particular DAM Asset.
For e.g.,
Resource res = resourceResolver.getResource("<<path to resource>>");
AssetDetails assetDetails = new AssetDetails(res);
assetDetails.getHeight();
assetDetails.getWidth();
Documentation :- https://docs.adobe.com/docs/en/aem/6-0/develop/ref/javadoc/com/day/cq/wcm/resource/details/AssetDeta...
I hope this will help you.
Thanks and Regards
Kautuk Sahni
Hi
I am not sure if this would help you.
But you can try, the AssetDetails class to get the details of a particular DAM Asset.
For e.g.,
Resource res = resourceResolver.getResource("<<path to resource>>");
AssetDetails assetDetails = new AssetDetails(res);
assetDetails.getHeight();
assetDetails.getWidth();
Documentation :- https://docs.adobe.com/docs/en/aem/6-0/develop/ref/javadoc/com/day/cq/wcm/resource/details/AssetDeta...
I hope this will help you.
Thanks and Regards
Kautuk Sahni
As Kautuk suggest - use the API and write a custom step and add that step to the given workflow.
Views
Replies
Total Likes
Adding more reference:-
// This is code example of Video component.
public Long getAvsRenditionWidth(Rendition rendition){
ValueMap renditionValueMap = rendition.getChild("jcr:content").getChild("metadata").getValueMap();
return renditionValueMap.get("width",Long.class);
}
2. https://docs.adobe.com/docs/en/aem/6-0/develop/ref/javadoc/com/day/cq/dam/commons/util/UIHelper.html
//This class provides various utility methods pertaining to DAM required in presentation/user interface.
I hope this will also help you.
~kautuk
Views
Replies
Total Likes