Package com.twelvemonkeys.contrib.tiff
Class TIFFUtilities.TIFFPage
java.lang.Object
com.twelvemonkeys.contrib.tiff.TIFFUtilities.TIFFPage
- Enclosing class:
TIFFUtilities
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate long[]
getValueAsLongArray
(Entry entry) private boolean
jfifContainsTables
(Entry tableEntry, long[] jpegOffsets, long[] jpegLengths) private Entry
mergeTables
(Entry qEntry, Entry dcEntry, Entry acEntry) private byte[]
void
rotate
(int degree) Rotates the image by changing TIFF.TAG_ORIENTATION.private long
write
(ImageOutputStream outputStream, TIFFWriter tiffWriter) private int[]
writeData
(long[] offsets, long[] byteCounts, ImageOutputStream outputStream) private void
writeData
(ImageInputStream input, ImageOutputStream output, long offset, long length) writeDirectoryData
(Directory IFD, ImageOutputStream outputStream) private void
writeSOF0
(ImageOutputStream outputStream, int bands, int width, int height, int subsampling) private void
writeSOS
(ImageOutputStream outputStream, int bands)
-
Field Details
-
IFD
-
stream
-
-
Constructor Details
-
TIFFPage
-
-
Method Details
-
write
- Throws:
IOException
-
writeDirectoryData
private List<Entry> writeDirectoryData(Directory IFD, ImageOutputStream outputStream) throws IOException - Throws:
IOException
-
writeSOF0
private void writeSOF0(ImageOutputStream outputStream, int bands, int width, int height, int subsampling) throws IOException - Throws:
IOException
-
writeSOS
- Throws:
IOException
-
writeData
private void writeData(ImageInputStream input, ImageOutputStream output, long offset, long length) throws IOException - Throws:
IOException
-
jfifContainsTables
private boolean jfifContainsTables(Entry tableEntry, long[] jpegOffsets, long[] jpegLengths) throws IOException - Throws:
IOException
-
mergeTables
- Throws:
IOException
-
readHUFFTable
- Throws:
IOException
-
writeData
private int[] writeData(long[] offsets, long[] byteCounts, ImageOutputStream outputStream) throws IOException - Throws:
IOException
-
getValueAsLongArray
- Throws:
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�.
-