Expand my Community achievements bar.

How do I create a new image transformer?


Level 5

Hi guys,


We have been creating new image transforms using the ACS class com.adobe.acs.commons.images.impl.NamedImageTransformerImpl. Very nice, you just create a new OSGI component configuration as follows:


<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"


and the transforms crop, bounded-resize, quality, and progressive are executed on the fly against the original image.


Okay, great. But limited. Now I need to create a new image transformer. I can do so by implementing the interface com.adobe.acs.commons.images.ImageTransformer, but I can't get the classes NamedTransformImageServlet or NamedImageTransformImpl to pick it up.


I think the ImageTransformer implementations get injected with the methods, NamedTransformImageServlet.bindImageTransformers and NamedImageTransformImpl.bindImageTransformers but I can't make the bundle pick up my implementation.


Any help?

0 Replies