public CoverageDataTiffImage createImage ( int tileWidth , int tileHeight ) { Rasters rasters = new Rasters ( tileWidth , tileHeight , 1 , BITS_PER_SAMPLE , TiffConstants . SAMPLE_FORMAT_FLOAT ) ; int rowsPerStrip = rasters . calculateRowsPerStrip ( TiffConstants . PLANAR_CONFIGURATION_CHUNKY ) ; FileDirectory fileDirectory = new FileDirectory ( ) ; fileDirectory . setImageWidth ( tileWidth ) ; fileDirectory . setImageHeight ( tileHeight ) ; fileDirectory . setBitsPerSample ( BITS_PER_SAMPLE ) ; fileDirectory . setCompression ( TiffConstants . COMPRESSION_NO ) ; fileDirectory . setPhotometricInterpretation ( TiffConstants . PHOTOMETRIC_INTERPRETATION_BLACK_IS_ZERO ) ; fileDirectory . setSamplesPerPixel ( SAMPLES_PER_PIXEL ) ; fileDirectory . setRowsPerStrip ( rowsPerStrip ) ; fileDirectory . setPlanarConfiguration ( TiffConstants . PLANAR_CONFIGURATION_CHUNKY ) ; fileDirectory . setSampleFormat ( TiffConstants . SAMPLE_FORMAT_FLOAT ) ; fileDirectory . setWriteRasters ( rasters ) ; CoverageDataTiffImage image = new CoverageDataTiffImage ( fileDirectory ) ; return image ; }
Create a new image