Get ICC Profile information from asset
Hi
I'm trying to get ICC PRofile information from the asset, but with no luck. Is there any way to grab those fields during asset processing inside a workflow step?
I have a code like that to get an asset object (it's just to describe my problem) implemented inside a class that inherits from WorkflowProcess:
ResourceResolver resolver = workflowSession.adaptTo(ResourceResolver.class);
String path = workItem.getWorkflowData().getPayload().toString();
if (StringUtils.contains(path, JcrConstants.JCR_CONTENT)) {
path = StringUtils.substringBefore(path, JcrConstants.JCR_CONTENT);
}
Resource resource = resolver.getResource(path);
Asset asset = resource == null ? null : resource.adaptTo(Asset.class);
if (asset == null) {
log.info("Asset is null, skipping metadata extraction");
}
assert asset != null;
String layerName = asset.getMetadata("photoshop:LayerName") != null ? asset.getMetadata("photoshop:LayerName").toString() : "";
Map<String, Object> meta = asset.getMetadata();
And in the last line, I can't see metadata ICC fields.
Any suggestions?