Package org.apache.xmlgraphics.image.codec.tiff

Examples of org.apache.xmlgraphics.image.codec.tiff.TIFFImageEncoder$Context


        OutputStream fos = createFile(outfile);
        if (fos == null) {
            return;
        }
        TIFFEncodeParam param = new TIFFEncodeParam();
        TIFFImageEncoder encoder = new TIFFImageEncoder(fos, param);
        try {
            encoder.encode(image);
        } catch (IOException e) {
            JMeterUtils.reportErrorToUser("TIFFImageEncoder reported: "+e.getMessage(), "Problem creating image file");
        // Yuck: TIFFImageEncoder uses Error to report runtime problems
        } catch (Error e) {
            JMeterUtils.reportErrorToUser("TIFFImageEncoder reported: "+e.getMessage(), "Problem creating image file");
View Full Code Here


     */
    public void writeImage(RenderedImage image, OutputStream out,
            ImageWriterParams params) throws IOException {
        TIFFEncodeParam encodeParams = createTIFFEncodeParams(params);
        updateParams(encodeParams, params, image);
        TIFFImageEncoder encoder = new TIFFImageEncoder(out, encodeParams);
        encoder.encode(image);
    }
View Full Code Here

        public void writeImage(RenderedImage image, ImageWriterParams params) throws IOException {
            if (encoder == null) {
                encodeParams = createTIFFEncodeParams(params);
                updateParams(encodeParams, params, image);
                encoder = new TIFFImageEncoder(out, encodeParams);
            }
            context = encoder.encodeMultiple(context, image);
        }
View Full Code Here

                          new long[][] {rational})
                };
        renderParams.setExtraFields(fields);

        // Creates encoder
        TIFFImageEncoder enc = new TIFFImageEncoder(outputStream, renderParams);

        // Creates lazy iterator over generated page images
        Iterator pageImagesItr = new LazyPageImagesIterator(getNumberOfPages(), log);

        // The first image to be passed to enc
        RenderedImage first = (RenderedImage) pageImagesItr.next();

        // The other images are set to the renderParams
        renderParams.setExtraImages(pageImagesItr);

        // Start encoding
        enc.encode(first);

        // Cleaning
        outputStream.flush();
        clearViewportList();
        log.debug("Tiff encoding done.");
View Full Code Here

TOP

Related Classes of org.apache.xmlgraphics.image.codec.tiff.TIFFImageEncoder$Context

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.