Package org.geoserver.map.turbojpeg

Examples of org.geoserver.map.turbojpeg.TurboJpegImageWorker


        assertTrue("Unable to find test data", input.exists() && input.isFile() && input.canRead());

        // create output file
        final File output = TestData.temp(this, "output.jpeg");
        try {
            new TurboJpegImageWorker(ImageIO.read(input)).writeTurboJPEG(new FileOutputStream(
                    output), 1.5f);
            assertFalse("We should not be allowed to specify compression ratios > 1", true);
        } catch (Exception e) {
            // TODO: handle exception
        }

        try {
            new TurboJpegImageWorker(ImageIO.read(input)).writeTurboJPEG(new FileOutputStream(
                    output), -.5f);
            assertFalse("We should not be allowed to specify compression ratios > 1", true);
        } catch (Exception e) {
            // TODO: handle exception
        }
View Full Code Here


        final File input = TestData.file(this, "testmergb.png");
        assertTrue("Unable to find test data", input.exists() && input.isFile() && input.canRead());

        // create output file
        final File output = TestData.temp(this, "output.jpeg");
        new TurboJpegImageWorker(ImageIO.read(input)).writeTurboJPEG(new FileOutputStream(output),.5f);
        assertTrue("Unable to create output file", output.exists() && output.isFile());

        new ImageWorker(output).getBufferedImage().flush();

    }
View Full Code Here

        final File input = TestData.file(this, "testmergba.png");
        assertTrue("Unable to find test data", input.exists() && input.isFile() && input.canRead());

        // create output file
        final File output = TestData.temp(this, "output.jpeg");
        new TurboJpegImageWorker(ImageIO.read(input)).writeTurboJPEG(new FileOutputStream(output),.5f);
        assertTrue("Unable to create output file", output.exists() && output.isFile());

        new ImageWorker(output).getBufferedImage().flush();

    }
View Full Code Here

TOP

Related Classes of org.geoserver.map.turbojpeg.TurboJpegImageWorker

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.