Package org.apache.xmlgraphics.image.loader.impl.imageio

Examples of org.apache.xmlgraphics.image.loader.impl.imageio.ImageLoaderImageIO


    public void testGrayPNGWithCMYKProfile() throws Exception {
        URL imageURL = getClass().getResource("gray-vs-cmyk-profile.png");
        Assert.assertNotNull(imageURL);
        String uri = imageURL.toURI().toASCIIString();

        ImageLoaderImageIO loader = new ImageLoaderImageIO(ImageFlavor.RENDERED_IMAGE);
        ImageContext context = MockImageContext.newSafeInstance();
        ImageSessionContext session = new MockImageSessionContext(context);
        ImageInfo info = new ImageInfo(uri, MimeConstants.MIME_PNG);
        Image im = loader.loadImage(info, null, session);
        assertTrue(im instanceof ImageRendered);
    }
View Full Code Here


        ImageManager manager = imageContext.getImageManager();
       
        ImageInfo info = manager.preloadImage(uri, sessionContext);
        assertNotNull("ImageInfo must not be null", info);
       
        ImageLoader loader = new ImageLoaderImageIO(ImageFlavor.RENDERED_IMAGE);
        ImageProviderPipeline pipeline = new ImageProviderPipeline(manager.getCache(), loader);
        pipeline.addConverter(new ImageConverterRendered2PNG());
       
        Image img = pipeline.execute(info, null, sessionContext);
        assertNotNull("Image must not be null", img);
View Full Code Here

        ImageManager manager = imageContext.getImageManager();

        ImageInfo info = manager.preloadImage(uri, sessionContext);
        assertNotNull("ImageInfo must not be null", info);

        ImageLoader loader = new ImageLoaderImageIO(ImageFlavor.RENDERED_IMAGE);
        ImageProviderPipeline pipeline = new ImageProviderPipeline(manager.getCache(), loader);
        pipeline.addConverter(new ImageConverterRendered2PNG());

        Image img = pipeline.execute(info, null, sessionContext);
        assertNotNull("Image must not be null", img);
View Full Code Here

TOP

Related Classes of org.apache.xmlgraphics.image.loader.impl.imageio.ImageLoaderImageIO

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.