Package com.twelvemonkeys.contrib.tiff
Class TIFFUtilities
java.lang.Object
com.twelvemonkeys.contrib.tiff.TIFFUtilities
TIFFUtilities for manipulation TIFF Images and Metadata
- Version:
- $Id$
- Author:
- Oliver Schmidtmer, last modified by $Author$
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static interface
static class
-
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImage
applyOrientation
(BufferedImage input, int orientation) static List<TIFFUtilities.TIFFPage>
getPages
(ImageInputStream imageInput) static void
Merges all pages from the input TIFF files into one TIFF file at the output location.static void
rotatePage
(ImageInputStream imageInput, ImageOutputStream imageOutput, int degree, int pageIndex) Rotates a page of a TIFF file by changing TIFF.TAG_ORIENTATION.static void
rotatePages
(ImageInputStream imageInput, ImageOutputStream imageOutput, int degree) Rotates all pages of a TIFF file by changing TIFF.TAG_ORIENTATION.Splits all pages from the input TIFF file to one file per page in the output directory.static void
writePages
(ImageOutputStream imageOutput, List<TIFFUtilities.TIFFPage> pages)
-
Method Details
-
merge
Merges all pages from the input TIFF files into one TIFF file at the output location.- Parameters:
inputFiles
-outputFile
-- Throws:
IOException
-
split
Splits all pages from the input TIFF file to one file per page in the output directory.- Parameters:
inputFile
-outputDirectory
-- Returns:
- generated files
- Throws:
IOException
-
rotatePages
public static void rotatePages(ImageInputStream imageInput, ImageOutputStream imageOutput, int degree) throws IOException Rotates all pages of a TIFF file 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
applyOrientation(BufferedImage, int)
for applying TIFF.TAG_ORIENTATION.- Parameters:
imageInput
-imageOutput
-degree
- Rotation amount, supports 90�, 180� and 270�.- Throws:
IOException
-
rotatePage
public static void rotatePage(ImageInputStream imageInput, ImageOutputStream imageOutput, int degree, int pageIndex) throws IOException Rotates a page of a TIFF file 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
applyOrientation(BufferedImage, int)
for applying TIFF.TAG_ORIENTATION.- Parameters:
imageInput
-imageOutput
-degree
- Rotation amount, supports 90�, 180� and 270�.pageIndex
- page which should be rotated or -1 for all pages.- Throws:
IOException
-
getPages
- Throws:
IOException
-
writePages
public static void writePages(ImageOutputStream imageOutput, List<TIFFUtilities.TIFFPage> pages) throws IOException - Throws:
IOException
-
applyOrientation
-