Package it.geosolutions.imageioimpl.plugins.tiff

Examples of it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReaderSpi


        byte[] tiffContents = getBinary(response);
        File file = File.createTempFile("bm_gtiff", "bm_gtiff.tiff", new File("./target"));
        FileUtils.writeByteArrayToFile(file, tiffContents);
       
        // TODO: check the tiff structure is the one requested
        final TIFFImageReader reader = (TIFFImageReader) new TIFFImageReaderSpi().createReaderInstance();
        reader.setInput(new FileImageInputStream(file));      
       
        // compression
        final TIFFImageMetadata metadata=(TIFFImageMetadata) reader.getImageMetadata(0);
        assertNotNull(metadata);
View Full Code Here


        byte[] tiffContents = getBinary(response);
        File file = File.createTempFile("bm_gtiff", "bm_gtiff.tiff", new File("./target"));
        FileUtils.writeByteArrayToFile(file, tiffContents);
       
        // TODO: check the tiff structure is the one requested
        final TIFFImageReader reader = (TIFFImageReader) new TIFFImageReaderSpi().createReaderInstance();
        reader.setInput(new FileImageInputStream(file));
       
        // tiling
        assertTrue(reader.isImageTiled(0));
        assertEquals(256, reader.getTileHeight(0));
View Full Code Here

        assertEquals("image/tiff", response.getContentType());
        tiffContents = getBinary(response);
        File fileOverviewSF = File.createTempFile("overviewSF", "overviewSF.tiff", new File("./target"));
        FileUtils.writeByteArrayToFile(fileOverviewSF, tiffContents);

        TIFFImageReaderSpi spi = new TIFFImageReaderSpi();
        TIFFImageReader readerNative = null;
        TIFFImageReader readerOverviewTS = null;
        TIFFImageReader readerOverviewSF = null;
        FileImageInputStream streamNative = null;
        FileImageInputStream streamOverviewTS = null;
        FileImageInputStream streamOverviewSF = null;
        try {
            streamNative = new FileImageInputStream(fileNative);
            readerNative = (TIFFImageReader) spi.createReaderInstance();
            readerNative.setInput(streamNative);

            streamOverviewTS = new FileImageInputStream(fileOverviewTS);
            readerOverviewTS = (TIFFImageReader) spi.createReaderInstance();
            readerOverviewTS.setInput(streamOverviewTS);

            streamOverviewSF = new FileImageInputStream(fileOverviewSF);
            readerOverviewSF = (TIFFImageReader) spi.createReaderInstance();
            readerOverviewSF.setInput(streamOverviewSF);

            // Reading back first image related to native request
            RenderedImage riNative = readerNative.read(0);
            Raster rasterNative = riNative.getData();
View Full Code Here

        byte[] tiffContents = getBinary(response);
        File file = File.createTempFile("bm_gtiff", "bm_gtiff.tiff", new File("./target"));
        FileUtils.writeByteArrayToFile(file, tiffContents);
       
        // TODO: check the tiff structure is the one requested
        final TIFFImageReader reader = (TIFFImageReader) new TIFFImageReaderSpi().createReaderInstance();
        reader.setInput(new FileImageInputStream(file));      
       
        // compression
        final TIFFImageMetadata metadata=(TIFFImageMetadata) reader.getImageMetadata(0);
//        IIOMetadataDumper IIOMetadataDumper = new IIOMetadataDumper(
View Full Code Here

        byte[] tiffContents = getBinary(response);
        File file = File.createTempFile("bm_gtiff", "bm_gtiff.tiff", new File("./target"));
        FileUtils.writeByteArrayToFile(file, tiffContents);
       
        // TODO: check the tiff structure is the one requested
        final TIFFImageReader reader = (TIFFImageReader) new TIFFImageReaderSpi().createReaderInstance();
        reader.setInput(new FileImageInputStream(file));      
       
        // compression
        TIFFImageMetadata metadata=(TIFFImageMetadata) reader.getImageMetadata(0);
//        IIOMetadataDumper IIOMetadataDumper = new IIOMetadataDumper(
View Full Code Here

        byte[] tiffContents = getBinary(response);
        File file = File.createTempFile("bm_gtiff", "bm_gtiff.tiff", new File("./target"));
        FileUtils.writeByteArrayToFile(file, tiffContents);
       
        // TODO: check the tiff structure is the one requested
        final TIFFImageReader reader = (TIFFImageReader) new TIFFImageReaderSpi().createReaderInstance();
        reader.setInput(new FileImageInputStream(file));      
       
        // compression
        final TIFFImageMetadata metadata=(TIFFImageMetadata) reader.getImageMetadata(0);
//        IIOMetadataDumper IIOMetadataDumper = new IIOMetadataDumper(
View Full Code Here

        byte[] tiffContents = getBinary(response);
        File file = File.createTempFile("bm_gtiff", "bm_gtiff.tiff", new File("./target"));
        FileUtils.writeByteArrayToFile(file, tiffContents);
       
        // TODO: check the tiff structure is the one requested
        final TIFFImageReader reader = (TIFFImageReader) new TIFFImageReaderSpi().createReaderInstance();
        reader.setInput(new FileImageInputStream(file));      
       
        // compression
        final TIFFImageMetadata metadata=(TIFFImageMetadata) reader.getImageMetadata(0);
//        IIOMetadataDumper IIOMetadataDumper = new IIOMetadataDumper(
View Full Code Here

        byte[] tiffContents = getBinary(response);
        File file = File.createTempFile("bm_gtiff", "bm_gtiff.tiff", new File("./target"));
        FileUtils.writeByteArrayToFile(file, tiffContents);
       
        // TODO: check the tiff structure is the one requested
        final TIFFImageReader reader = (TIFFImageReader) new TIFFImageReaderSpi().createReaderInstance();
        reader.setInput(new FileImageInputStream(file));      
       
        // compression
        final TIFFImageMetadata metadata=(TIFFImageMetadata) reader.getImageMetadata(0);
        assertNotNull(metadata);
View Full Code Here

        byte[] tiffContents = getBinary(response);
        File file = new File("./target/bm_gtiff.tiff");
        FileUtils.writeByteArrayToFile(file, tiffContents);
       
        // TODO: check the tiff structure is the one requested
        final TIFFImageReader reader = (TIFFImageReader) new TIFFImageReaderSpi().createReaderInstance();
        reader.setInput(new FileImageInputStream(file));
       
        // tiling
        assertTrue(reader.isImageTiled(0));
        assertEquals(368, reader.getTileHeight(0));
View Full Code Here

        byte[] tiffContents = getBinary(response);
        File file = new File("./target/bm_gtiff.tiff");
        FileUtils.writeByteArrayToFile(file, tiffContents);
       
        // TODO: check the tiff structure is the one requested
        final TIFFImageReader reader = (TIFFImageReader) new TIFFImageReaderSpi().createReaderInstance();
        reader.setInput(new FileImageInputStream(file));
       
        // tiling
        assertTrue(reader.isImageTiled(0));
        assertEquals(256, reader.getTileHeight(0));
View Full Code Here

TOP

Related Classes of it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReaderSpi

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.