Examples of renderImage()


Examples of org.apache.myfaces.trinidadinternal.image.ImageRenderer.renderImage()

    // Get the ImageRenderer to use for the requested type
    ImageRenderer renderer = _getImageRenderer(type);
    assert (renderer != null);

    // Render the image
    Image image = renderer.renderImage(context,
                                       properties,
                                       responseProperties);

    // If we didn't get an Image, we're done.
    if (image == null)
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.image.ImageRenderer.renderImage()

    // Get the ImageRenderer to use for the requested type
    ImageRenderer renderer = _getImageRenderer(type);
    assert (renderer != null);

    // Render the image
    Image image = renderer.renderImage(context,
                                       properties,
                                       responseProperties);

    // If we didn't get an Image, we're done.
    if (image == null)
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.image.ImageRenderer.renderImage()

    // Get the ImageRenderer to use for the requested type
    ImageRenderer renderer = _getImageRenderer(type);
    assert (renderer != null);

    // Render the image
    Image image = renderer.renderImage(context,
                                       properties,
                                       responseProperties);

    // If we didn't get an Image, we're done.
    if (image == null)
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.image.ImageRenderer.renderImage()

    // Get the ImageRenderer to use for the requested type
    ImageRenderer renderer = _getImageRenderer(type);
    assert (renderer != null);

    // Render the image
    Image image = renderer.renderImage(context,
                                       properties,
                                       responseProperties);

    // If we didn't get an Image, we're done.
    if (image == null)
View Full Code Here

Examples of org.apache.pdfbox.rendering.PDFRenderer.renderImage()

        PDFRenderer pdfRenderer = new PDFRenderer(document);
        ArrayList<BufferedImage> srcImgTab = new ArrayList<BufferedImage>();
        ArrayList<ByteArrayOutputStream> srcContentStreamTab = new ArrayList<ByteArrayOutputStream>();
        for (int i = 0; i < numSrcPages; ++i)
        {
            srcImgTab.add(pdfRenderer.renderImage(i));
            COSStream contentStream = document.getPage(i).getContentStream();
            InputStream unfilteredStream = contentStream.getUnfilteredStream();
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            IOUtils.copy(unfilteredStream, baos);
            unfilteredStream.close();
View Full Code Here

Examples of org.apache.pdfbox.rendering.PDFRenderer.renderImage()

        Assert.assertEquals(numSrcPages, encryptedDoc.getNumberOfPages());
        pdfRenderer = new PDFRenderer(encryptedDoc);
        for (int i = 0; i < encryptedDoc.getNumberOfPages(); ++i)
        {
            // compare rendering
            BufferedImage bim = pdfRenderer.renderImage(i);
            ValidateXImage.checkIdent(bim, srcImgTab.get(i));

            // compare content streams
            COSStream contentStreamDecr = encryptedDoc.getPage(i).getContentStream();
            InputStream unfilteredStream = contentStreamDecr.getUnfilteredStream();
View Full Code Here

Examples of org.apache.pdfbox.rendering.PDFRenderer.renderImage()

        PDDocument doc = null;
        try
        {
            doc = PDDocument.load(PDFontTest.class.getResourceAsStream("F001u_3_7j.pdf"));
            PDFRenderer renderer = new PDFRenderer(doc);
            renderer.renderImage(0);
            // the allegation is that renderImage() will crash the JVM or hang
        }
        finally
        {
            if (doc != null)
View Full Code Here

Examples of org.apache.pdfbox.rendering.PDFRenderer.renderImage()

        PDDocument doc = null;
        try
        {
            doc = PDDocument.load(PDFontTest.class.getResourceAsStream("256.pdf"));
            PDFRenderer renderer = new PDFRenderer(doc);
            renderer.renderImage(0);
            // the allegation is that renderImage() will crash the JVM or hang
        }
        finally
        {
            if (doc != null)
View Full Code Here

Examples of org.apache.pdfbox.rendering.PDFRenderer.renderImage()

    public void render() throws IOException
    {
        File file = new File(INPUT_DIR, fileName);
        PDDocument document = PDDocument.load(file);
        PDFRenderer renderer = new PDFRenderer(document);
        BufferedImage image = renderer.renderImage(0);

        // We don't actually do anything with the image for the same reason that
        // TestPDFToImage is disabled - different JVMs produce different results
        // but at least we can make sure that PDFBox did not throw any exceptions
        // during the rendering process.
View Full Code Here

Examples of org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.renderImage()

        GridCoverageRenderer renderer = new GridCoverageRenderer(googleMercator, mapExtent,
                screenSize, w2s);

        RasterSymbolizer rasterSymbolizer = new StyleBuilder().createRasterSymbolizer();
        GridCoverage2D coverage = worldReader.read(null);
        RenderedImage image = renderer.renderImage(coverage, rasterSymbolizer,
                Interpolation.getInstance(Interpolation.INTERP_NEAREST), Color.RED, 256, 256);
        File reference = new File(
                "src/test/resources/org/geotools/renderer/lite/gridcoverage2d/googleMercator.png");
        ImageAssert.assertEquals(reference, image, 0);
    }
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.