Package org.apache.fop.image

Examples of org.apache.fop.image.TIFFImage


                io.setImageEncoding((byte)0x83);
                io.setImageData(fopimage.getRessourceBytes());
            */
            } else if (MimeConstants.MIME_TIFF.equals(mime)
                        && fopimage instanceof TIFFImage) {
                TIFFImage tiffImage = (TIFFImage) fopimage;
                int x = mpts2units(pos.getX() + currentIPPosition);
                int y = mpts2units(pos.getY() + currentBPPosition);
                int w = mpts2units(pos.getWidth());
                int h = mpts2units(pos.getHeight());
                ImageObject io = _afpDataStream.getImageObject(x, y, w, h);
                io.setImageParameters(
                    (int)(fopimage.getHorizontalResolution() * 10),
                    (int)(fopimage.getVerticalResolution() * 10),
                    fopimage.getWidth(),
                    fopimage.getHeight()
                );
                if (tiffImage.getStripCount() == 1) {
                    int comp = tiffImage.getCompression();
                    if (comp == 3) {
                        if (!fopimage.load(FopImage.ORIGINAL_DATA)) {
                            return;
                        }
                        io.setImageEncoding((byte)0x81);
View Full Code Here


            pdfFilter.setApplied(true);
            isDCT = true;

        } else if ("image/tiff".equals(fopImage.getMimeType())
                    && fopImage instanceof TIFFImage) {
            TIFFImage tiffImage = (TIFFImage) fopImage;
            if (tiffImage.getStripCount() == 1) {
                int comp = tiffImage.getCompression();
                if (comp == 1) {
                    // Nothing to do
                } else if (comp == 3) {
                    pdfFilter = new CCFFilter();
                    pdfFilter.setApplied(true);
                    isCCF = true;
                } else if (comp == 4) {
                    pdfFilter = new CCFFilter();
                    pdfFilter.setApplied(true);
                    ((CCFFilter)pdfFilter).setDecodeParms("<< /K -1 /Columns "
                        + tiffImage.getWidth() + " >>");
                    isCCF = true;
                } else if (comp == 6) {
                    pdfFilter = new DCTFilter();
                    pdfFilter.setApplied(true);
                    isDCT = true;
View Full Code Here

                io.setImageEncoding((byte)0x83);
                io.setImageData(fopimage.getRessourceBytes());
            */
            } else if (MimeConstants.MIME_TIFF.equals(mime)
                        && fopimage instanceof TIFFImage) {
                TIFFImage tiffImage = (TIFFImage) fopimage;
                int x = mpts2units(pos.getX() + currentIPPosition);
                int y = mpts2units(pos.getY() + currentBPPosition);
                int w = mpts2units(pos.getWidth());
                int h = mpts2units(pos.getHeight());
                ImageObject io = _afpDataStream.getImageObject(x, y, w, h);
                io.setImageParameters(
                    (int)(fopimage.getHorizontalResolution() * 10),
                    (int)(fopimage.getVerticalResolution() * 10),
                    fopimage.getWidth(),
                    fopimage.getHeight()
                );
                if (tiffImage.getStripCount() == 1) {
                    int comp = tiffImage.getCompression();
                    if (comp == 3) {
                        if (!fopimage.load(FopImage.ORIGINAL_DATA)) {
                            return;
                        }
                        io.setImageEncoding((byte)0x81);
View Full Code Here

            pdfFilter.setApplied(true);
            isDCT = true;

        } else if ("image/tiff".equals(fopImage.getMimeType())
                    && fopImage instanceof TIFFImage) {
            TIFFImage tiffImage = (TIFFImage) fopImage;
            if (tiffImage.getStripCount() == 1) {
                int comp = tiffImage.getCompression();
                if (comp == 1) {
                    // Nothing to do
                } else if (comp == 3) {
                    pdfFilter = new CCFFilter();
                    pdfFilter.setApplied(true);
                    isCCF = true;
                } else if (comp == 4) {
                    pdfFilter = new CCFFilter();
                    pdfFilter.setApplied(true);
                    ((CCFFilter)pdfFilter).setDecodeParms("<< /K -1 /Columns "
                        + tiffImage.getWidth() + " >>");
                    isCCF = true;
                } else if (comp == 6) {
                    pdfFilter = new DCTFilter();
                    pdfFilter.setApplied(true);
                    isDCT = true;
View Full Code Here

                pdfICCStream = doc.getFactory().makePDFICCStream();
                pdfICCStream.setColorSpace(prof, pdfCS);
            }
        } else if ("image/tiff".equals(fopImage.getMimeType())
                    && fopImage instanceof TIFFImage) {
            TIFFImage tiffImage = (TIFFImage) fopImage;
            if (tiffImage.getStripCount() == 1) {
                int comp = tiffImage.getCompression();
                if (comp == 1) {
                    // Nothing to do
                } else if (comp == 3) {
                    pdfFilter = new CCFFilter();
                    pdfFilter.setApplied(true);
                    isCCF = true;
                } else if (comp == 4) {
                    pdfFilter = new CCFFilter();
                    pdfFilter.setApplied(true);
                    ((CCFFilter)pdfFilter).setDecodeParms("<< /K -1 /Columns "
                        + tiffImage.getWidth() + " >>");
                    isCCF = true;
                } else if (comp == 6) {
                    pdfFilter = new DCTFilter();
                    pdfFilter.setApplied(true);
                    isDCT = true;
View Full Code Here

                pdfICCStream = doc.getFactory().makePDFICCStream();
                pdfICCStream.setColorSpace(prof, pdfCS);
            }
        } else if ("image/tiff".equals(fopImage.getMimeType())
                    && fopImage instanceof TIFFImage) {
            TIFFImage tiffImage = (TIFFImage) fopImage;
            if (tiffImage.getStripCount() == 1) {
                int comp = tiffImage.getCompression();
                if (comp == 1) {
                    // Nothing to do
                } else if (comp == 3) {
                    pdfFilter = new CCFFilter();
                    pdfFilter.setApplied(true);
                    isCCF = true;
                } else if (comp == 4) {
                    pdfFilter = new CCFFilter();
                    pdfFilter.setApplied(true);
                    ((CCFFilter)pdfFilter).setDecodeParms("<< /K -1 /Columns "
                        + tiffImage.getWidth() + " >>");
                    isCCF = true;
                } else if (comp == 6) {
                    pdfFilter = new DCTFilter();
                    pdfFilter.setApplied(true);
                    isDCT = true;
View Full Code Here

TOP

Related Classes of org.apache.fop.image.TIFFImage

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.