Package com.adobe.acs.commons.images

Examples of com.adobe.acs.commons.images.NamedImageTransformer


    @Override
    protected final void doGet(final SlingHttpServletRequest request, final SlingHttpServletResponse response) throws
            ServletException, IOException {

        final String transformName = PathInfoUtil.getSuffixSegment(request, 0);
        final NamedImageTransformer namedImageTransformer = this.namedImageTransformers.get(transformName);

        final Image image = this.resolveImage(request);
        final String mimeType = this.getMimeType(request, image);
        Layer layer = this.getLayer(image);
       
        // Transform the image
        layer = namedImageTransformer.transform(layer);

        final double quality = (mimeType.equals(MIME_TYPE_GIF) ? IMAGE_GIF_MAX_QUALITY : IMAGE_MAX_QUALITY);
        response.setContentType(mimeType);

        layer.write(mimeType, quality, response.getOutputStream());
View Full Code Here

TOP

Related Classes of com.adobe.acs.commons.images.NamedImageTransformer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.