Package org.apache.xmlgraphics.image.writer

Examples of org.apache.xmlgraphics.image.writer.MultiImageWriter.writeImage()


            MultiImageWriter multiWriter = writer.createMultiImageWriter(outputStream);
            try {
                // Write all pages/images
                while (pageImagesItr.hasNext()) {
                    RenderedImage img = (RenderedImage) pageImagesItr.next();
                    multiWriter.writeImage(img, writerParams);
                }
            } finally {
                multiWriter.close();
            }
        } else {
View Full Code Here


            params.setCompressionMethod(compression);
            params.setResolution(72);
           
            if (writer.supportsMultiImageWriter()) {
                MultiImageWriter multiWriter = writer.createMultiImageWriter(out);
                multiWriter.writeImage(createAnImage(compression, 1), params);
                multiWriter.writeImage(createAnImage(compression, 2), params);
                multiWriter.close();
            } else {
                throw new UnsupportedOperationException("multi-page images not supported for "
                        + format);
View Full Code Here

            params.setResolution(72);
           
            if (writer.supportsMultiImageWriter()) {
                MultiImageWriter multiWriter = writer.createMultiImageWriter(out);
                multiWriter.writeImage(createAnImage(compression, 1), params);
                multiWriter.writeImage(createAnImage(compression, 2), params);
                multiWriter.close();
            } else {
                throw new UnsupportedOperationException("multi-page images not supported for "
                        + format);
            }
View Full Code Here

                ImageWriterParams iwp = new ImageWriterParams();
                iwp.setCompressionMethod("JPEG");

                for (int pageNumber = 0; pageNumber <= 2; pageNumber++) {
                    BufferedImage image = new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_GRAY);
                    writer.writeImage(image, iwp);
                }
            }
        } finally {
            writer.close();
        }
View Full Code Here

            MultiImageWriter multiWriter = writer.createMultiImageWriter(outputStream);
            try {
                // Write all pages/images
                while (pageImagesItr.hasNext()) {
                    RenderedImage img = (RenderedImage) pageImagesItr.next();
                    multiWriter.writeImage(img, writerParams);
                }
            } finally {
                multiWriter.close();
            }
        } else {
View Full Code Here

            params.setCompressionMethod(compression);
            params.setResolution(72);

            if (writer.supportsMultiImageWriter()) {
                MultiImageWriter multiWriter = writer.createMultiImageWriter(out);
                multiWriter.writeImage(createAnImage(compression, 1), params);
                multiWriter.writeImage(createAnImage(compression, 2), params);
                multiWriter.close();
            } else {
                throw new UnsupportedOperationException("multi-page images not supported for "
                        + format);
View Full Code Here

            params.setResolution(72);

            if (writer.supportsMultiImageWriter()) {
                MultiImageWriter multiWriter = writer.createMultiImageWriter(out);
                multiWriter.writeImage(createAnImage(compression, 1), params);
                multiWriter.writeImage(createAnImage(compression, 2), params);
                multiWriter.close();
            } else {
                throw new UnsupportedOperationException("multi-page images not supported for "
                        + format);
            }
View Full Code Here

                ImageWriterParams iwp = new ImageWriterParams();
                iwp.setCompressionMethod("JPEG");

                for (int pageNumber = 0; pageNumber <= 2; pageNumber++) {
                    BufferedImage image = new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_GRAY);
                    writer.writeImage(image, iwp);
                }
            }
        } finally {
            writer.close();
        }
View Full Code Here

            MultiImageWriter multiWriter = writer.createMultiImageWriter(outputStream);
            try {
                // Write all pages/images
                while (pageImagesItr.hasNext()) {
                    RenderedImage img = (RenderedImage) pageImagesItr.next();
                    multiWriter.writeImage(img, writerParams);
                }
            } finally {
                multiWriter.close();
            }
        } else {
View Full Code Here

            MultiImageWriter multiWriter = writer.createMultiImageWriter(outputStream);
            try {
                // Write all pages/images
                while (pageImagesItr.hasNext()) {
                    RenderedImage img = (RenderedImage) pageImagesItr.next();
                    multiWriter.writeImage(img, writerParams);
                }
            } finally {
                multiWriter.close();
            }
        } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.