Package org.apache.xmlgraphics.image.writer

Examples of org.apache.xmlgraphics.image.writer.ImageWriter


                log.debug("Encoding page " + (i + 1));
                ImageWriterParams params = new ImageWriterParams();
                params.setResolution(Math.round(userAgent.getTargetResolution()));
               
                // Encode PNG image
                ImageWriter writer = ImageWriterRegistry.getInstance().getWriterFor(getMimeType());
                log.debug("Writing image using " + writer.getClass().getName());
                writer.writeImage(image, os, params);
            } finally {
                //Only close self-created OutputStreams
                if (os != firstOutputStream) {
                    IOUtils.closeQuietly(os);
                }
View Full Code Here

TOP

Related Classes of org.apache.xmlgraphics.image.writer.ImageWriter

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.