Package javax.media.jai

Examples of javax.media.jai.RenderedOp


    }

    public void testClipLargerDisabledGreyPNG2Bit()
        throws Throwable, IOException, MalformedURLException {

        RenderedOp image = doClip(OutputImageRules.GRAYSCALEPNG2, 700, "left");
        assertEquals("Image is not greyscale", true,
                     TestUtilities.isGreyscale(image));
    }
View Full Code Here


    }

    public void testClipLargerDisabledGreyGIF2Bit()
        throws Throwable, IOException, MalformedURLException {

        RenderedOp image = doClip(OutputImageRules.GREYSCALEGIF2, 700, "left");
        assertEquals("Image is not greyscale2", true,
                     TestUtilities.isGreyscale2(image));
    }
View Full Code Here

    }

    public void testClipLargerDisabledMonochromePNG()
        throws Throwable, IOException, MalformedURLException {

        RenderedOp image = doClip(OutputImageRules.GRAYSCALEPNG1, 700, "left");
        assertEquals("Image is not monochrome", true,
                     TestUtilities.isMonochrome(image));
    }
View Full Code Here

    }

    public void testClipLargerDisabledMonochromeGIF()
        throws Throwable, IOException, MalformedURLException {

        RenderedOp image = doClip(OutputImageRules.GREYSCALEGIF1, 700, "left");
        assertEquals("Image is not monochrome", true,
                     TestUtilities.isMonochrome(image));

    }
View Full Code Here

    }

    public void testClipLargerDisabledMonochromeWBMP()
        throws Throwable, IOException, MalformedURLException {

        RenderedOp image = doClip(OutputImageRules.WBMP, 700, "left");
        assertEquals("Image is not monochrome", true,
                     TestUtilities.isMonochrome(image));
    }
View Full Code Here

                                     {"v.p", protectedArea}}
                                 : new String[][]{
                                     {"v.width", String.valueOf(width)}},
                                 true);

        RenderedOp image = JAI.create("ImageRead", ImageIO.createImageInputStream(stream));
        return image;
    }
View Full Code Here

    }

    private void checkCase(int width, String protectedArea, int expWidth,
                           int expHeight)
        throws Throwable, IOException, MalformedURLException {
        RenderedOp image = null;
        image = doResize(OutputImageRules.COLOURJPEG24, width, protectedArea);
        assertEquals("Image is not true colour", true,
                     TestUtilities.isTrueColour(image));
        assertEquals(image.getWidth(), expWidth);
        assertEquals(image.getHeight(), expHeight);
    }
View Full Code Here

                doImageTranscodeTest(expectations,
                                     rule,
                                     image,
                                     parameters, true);

        RenderedOp img = JAI.create("ImageRead", ImageIO.createImageInputStream(stream));
        if (expected.equals("tc")) {
            assertEquals("Image is not truecolour", true,
                         TestUtilities.isTrueColour(img));
        } else if (expected.equals("mono")) {
            assertEquals("Image is not Monochrome", true,
View Full Code Here

            // wbmps do not have a magic number so
            // ImageRead operation cannot recognize them.
            pblock.setParameter("Reader",
                ImageIO.getImageReadersByFormatName("wbmp").next());
        }
        RenderedOp image = JAI.create("ImageRead", pblock);

        return image;
    }
View Full Code Here

    public void testConversionToAllFormats() throws Throwable {

        Iterator i = ImageWriterFactoryImpl.RULES.keySet().iterator();
        while (i.hasNext()) {
            String rule = (String)i.next();           
            RenderedOp image = TestUtilities.transcodeToImage(expectations, rule, "animated_indexed.gif", null, true);
            TestUtilities.checkConversionResult(rule, image);
        }
    }
View Full Code Here

TOP

Related Classes of javax.media.jai.RenderedOp

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.