Package mil.nga.tiff
Class TiffWriter
- java.lang.Object
-
- mil.nga.tiff.TiffWriter
-
public class TiffWriter extends Object
TIFF Writer. For a striped TIFF, theFileDirectory.setStripOffsets(List)
andFileDirectory.setStripByteCounts(List)
methods are automatically set or adjusted based upon attributes including:FileDirectory.getRowsPerStrip()
,FileDirectory.getImageHeight()
,FileDirectory.getPlanarConfiguration()
, andFileDirectory.getSamplesPerPixel()
. TheRasters.calculateRowsPerStrip(int)
andRasters.calculateRowsPerStrip(int, int)
methods provide a mechanism for determining aFileDirectory.getRowsPerStrip()
setting.- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description TiffWriter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
writeTiff(File file, ByteWriter writer, TIFFImage tiffImage)
Write a TIFF to a filestatic void
writeTiff(File file, TIFFImage tiffImage)
Write a TIFF to a filestatic void
writeTiff(ByteWriter writer, TIFFImage tiffImage)
Write a TIFF to a byte writerstatic byte[]
writeTiffToBytes(ByteWriter writer, TIFFImage tiffImage)
Write a TIFF to bytesstatic byte[]
writeTiffToBytes(TIFFImage tiffImage)
Write a TIFF to bytes
-
-
-
Method Detail
-
writeTiff
public static void writeTiff(File file, TIFFImage tiffImage) throws IOException
Write a TIFF to a file- Parameters:
file
- file to createtiffImage
- TIFF image- Throws:
IOException
- upon failure to write
-
writeTiff
public static void writeTiff(File file, ByteWriter writer, TIFFImage tiffImage) throws IOException
Write a TIFF to a file- Parameters:
file
- file to createwriter
- byte writertiffImage
- TIFF Image- Throws:
IOException
- upon failure to write
-
writeTiffToBytes
public static byte[] writeTiffToBytes(TIFFImage tiffImage) throws IOException
Write a TIFF to bytes- Parameters:
tiffImage
- TIFF image- Returns:
- tiff bytes
- Throws:
IOException
- upon failure to write
-
writeTiffToBytes
public static byte[] writeTiffToBytes(ByteWriter writer, TIFFImage tiffImage) throws IOException
Write a TIFF to bytes- Parameters:
writer
- byte writertiffImage
- TIFF image- Returns:
- tiff bytes
- Throws:
IOException
- upon failure to write
-
writeTiff
public static void writeTiff(ByteWriter writer, TIFFImage tiffImage) throws IOException
Write a TIFF to a byte writer- Parameters:
writer
- byte writertiffImage
- TIFF image- Throws:
IOException
- upon failure to write
-
-