Package com.twelvemonkeys.contrib.tiff
Class TIFFUtilities.TIFFPage
- java.lang.Object
-
- com.twelvemonkeys.contrib.tiff.TIFFUtilities.TIFFPage
-
- Enclosing class:
- TIFFUtilities
public static class TIFFUtilities.TIFFPage extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private long[]getValueAsLongArray(Entry entry)private booleanjfifContainsTables(Entry tableEntry, long[] jpegOffsets, long[] jpegLengths)private EntrymergeTables(Entry qEntry, Entry dcEntry, Entry acEntry)private byte[]readHUFFTable()voidrotate(int degree)Rotates the image by changing TIFF.TAG_ORIENTATION.private longwrite(javax.imageio.stream.ImageOutputStream outputStream, TIFFWriter tiffWriter)private int[]writeData(long[] offsets, long[] byteCounts, javax.imageio.stream.ImageOutputStream outputStream)private voidwriteData(javax.imageio.stream.ImageInputStream input, javax.imageio.stream.ImageOutputStream output, long offset, long length)private java.util.List<Entry>writeDirectoryData(Directory IFD, javax.imageio.stream.ImageOutputStream outputStream)private voidwriteSOF0(javax.imageio.stream.ImageOutputStream outputStream, int bands, int width, int height, int subsampling)private voidwriteSOS(javax.imageio.stream.ImageOutputStream outputStream, int bands)
-
-
-
Field Detail
-
IFD
private Directory IFD
-
stream
private javax.imageio.stream.ImageInputStream stream
-
-
Constructor Detail
-
TIFFPage
private TIFFPage(Directory IFD, javax.imageio.stream.ImageInputStream stream)
-
-
Method Detail
-
write
private long write(javax.imageio.stream.ImageOutputStream outputStream, TIFFWriter tiffWriter) throws java.io.IOException- Throws:
java.io.IOException
-
writeDirectoryData
private java.util.List<Entry> writeDirectoryData(Directory IFD, javax.imageio.stream.ImageOutputStream outputStream) throws java.io.IOException
- Throws:
java.io.IOException
-
writeSOF0
private void writeSOF0(javax.imageio.stream.ImageOutputStream outputStream, int bands, int width, int height, int subsampling) throws java.io.IOException- Throws:
java.io.IOException
-
writeSOS
private void writeSOS(javax.imageio.stream.ImageOutputStream outputStream, int bands) throws java.io.IOException- Throws:
java.io.IOException
-
writeData
private void writeData(javax.imageio.stream.ImageInputStream input, javax.imageio.stream.ImageOutputStream output, long offset, long length) throws java.io.IOException- Throws:
java.io.IOException
-
jfifContainsTables
private boolean jfifContainsTables(Entry tableEntry, long[] jpegOffsets, long[] jpegLengths) throws java.io.IOException
- Throws:
java.io.IOException
-
mergeTables
private Entry mergeTables(Entry qEntry, Entry dcEntry, Entry acEntry) throws java.io.IOException
- Throws:
java.io.IOException
-
readHUFFTable
private byte[] readHUFFTable() throws java.io.IOException- Throws:
java.io.IOException
-
writeData
private int[] writeData(long[] offsets, long[] byteCounts, javax.imageio.stream.ImageOutputStream outputStream) throws java.io.IOException- Throws:
java.io.IOException
-
getValueAsLongArray
private long[] getValueAsLongArray(Entry entry) throws javax.imageio.IIOException
- Throws:
javax.imageio.IIOException
-
rotate
public void rotate(int degree)
Rotates the image by changing TIFF.TAG_ORIENTATION.NOTICE: TIFF.TAG_ORIENTATION is an advice how the image is meant do be displayed. Other metadata, such as width and height, relate to the image as how it is stored. The ImageIO TIFF plugin does not handle orientation. Use
TIFFUtilities.applyOrientation(BufferedImage, int)for applying TIFF.TAG_ORIENTATION.- Parameters:
degree- Rotation amount, supports 90�, 180� and 270�.
-
-