Package com.volantis.map.ics.imageprocessor

Examples of com.volantis.map.ics.imageprocessor.ImageProcessor


                        descriptor.getInputParameters(), config);
                icsBuilder.overlayEnvironmentParameters(
                        descriptor.getInputParameters(), envParams);

                // @todo perform check for supported operation type here.
                ImageProcessor processor =
                    ImageProcessorFactory.getInstance().
                        createImageProcessor(ToolFactory.getInstance(),
                                             ImageWriterFactory.getInstance());

                Representation representation =
                    ImageLoader.load(descriptor.getInputParameters().getParameterValue(ParameterNames.SOURCE_URL),
                            retriever, request, descriptor);
                inputStream = new NoCloseSeekableInputStream(representation.getSeekableInputStream());
                new PreservationParamsBuilder().process(request, descriptor);

                // now get the input stream for the watermark image.
                // @todo later this could probably be cached.
                if (descriptor.getInputParameters().containsName(
                    ParameterNames.WATERMARK_URL)) {
                    Representation watermarkRepresentation =
                        ImageLoader.load(descriptor.getInputParameters().getParameterValue(ParameterNames.WATERMARK_URL),
                                retriever, request, descriptor);
                    watermarkStream =
                        new NoCloseSeekableInputStream(watermarkRepresentation.getSeekableInputStream());
                    descriptor.getInputParameters().setObject(
                        ParameterNames.WATERMARK_INPUT_STREAM, watermarkStream);
                }

                outputData =
                    new NoFlushSeekableOutputStream(response.getOutputStream());

                processor.process(new NoCloseSeekableInputStream(inputStream),
                                  outputData,
                                  descriptor.getInputParameters());

                // Set the expiry header for the cache
                setCacheData(response, representation.getCacheInfo());
View Full Code Here

TOP

Related Classes of com.volantis.map.ics.imageprocessor.ImageProcessor

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.