Examples of determineCandidatePipelines()


Examples of org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory.determineCandidatePipelines()

        }
        if (pipeline.toString().indexOf("ImageConverterBitmap2G2D") < 0) {
            fail("Chose the wrong pipeline: " + pipeline.toString());
        }

        ImageProviderPipeline[] candidates = pFactory.determineCandidatePipelines(
                imageInfo, new ImageFlavor[] {targetFlavor});
        assertEquals(1, candidates.length);

        //Now add another implementation that poses as TIFF loader
        imageContext.getImageManager().getRegistry().registerLoaderFactory(
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory.determineCandidatePipelines()

        //Now add another implementation that poses as TIFF loader
        imageContext.getImageManager().getRegistry().registerLoaderFactory(
                new MockImageLoaderFactoryTIFF());

        candidates = pFactory.determineCandidatePipelines(
                imageInfo, targetFlavor);
        assertEquals(3, candidates.length);
        //3 because the mock impl provides Buffered- and RenderedImage capabilities

        pipeline = pFactory.newImageConverterPipeline(imageInfo, targetFlavor);
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory.determineCandidatePipelines()

        //We want either a G2D image or a raw CCITT image
        ImageFlavor[] targetFlavors = new ImageFlavor[] {
                ImageFlavor.GRAPHICS2D, ImageFlavor.RAW_CCITTFAX};

        ImageProviderPipeline[] candidates = pFactory.determineCandidatePipelines(
                imageInfo, targetFlavors);
        assertNotNull(candidates);
        assertEquals(2, candidates.length);

        ImageProviderPipeline pipeline = manager.choosePipeline(candidates);
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory.determineCandidatePipelines()

        }

        //Now, we set this to a multi-strip TIFF which should disable the raw loader
        imageInfo.getCustomObjects().put("TIFF_STRIP_COUNT", new Integer(7));

        candidates = pFactory.determineCandidatePipelines(
                imageInfo, targetFlavors);
        assertNotNull(candidates);
        assertEquals(1, candidates.length);

        pipeline = manager.choosePipeline(candidates);
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory.determineCandidatePipelines()

        //We want either a G2D image or a raw CCITT image
        ImageFlavor[] targetFlavors = new ImageFlavor[] {
                ImageFlavor.GRAPHICS2D, ImageFlavor.RAW_CCITTFAX};

        ImageProviderPipeline[] candidates = pFactory.determineCandidatePipelines(
                imageInfo, targetFlavors);
        assertNotNull(candidates);
        assertEquals(2, candidates.length);

        ImageProviderPipeline pipeline = manager.choosePipeline(candidates);
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory.determineCandidatePipelines()

        //Now set an infinite penalty making the solution ineligible
        registry.setAdditionalPenalty(ImageLoaderRawCCITTFax.class.getName(),
                Penalty.INFINITE_PENALTY);

        candidates = pFactory.determineCandidatePipelines(imageInfo, targetFlavors);
        assertNotNull(candidates);
        assertEquals(1, candidates.length);
        //While earlier 2 candidates were returned, here we only get 1 because of the infinite
        //penalty.
    }
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.