public class TIFFUtilities extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
TIFFUtilities.TIFFBaseline
TODO: Temporary clone, to be removed after TMI204 has been closed
|
static class |
TIFFUtilities.TIFFEntry
TODO: Temporary clone, to be removed after TMI204 has been closed
|
static interface |
TIFFUtilities.TIFFExtension
TODO: Temporary clone, to be removed after TMI204 has been closed
|
static class |
TIFFUtilities.TIFFPage |
Modifier and Type | Method and Description |
---|---|
static BufferedImage |
applyOrientation(BufferedImage input,
int orientation) |
static List<TIFFUtilities.TIFFPage> |
getPages(ImageInputStream imageInput) |
static void |
merge(List<File> inputFiles,
File outputFile)
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.
|
static List<File> |
split(File inputFile,
File outputDirectory)
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) |
public static void merge(List<File> inputFiles, File outputFile) throws IOException
inputFiles
- outputFile
- IOException
public static List<File> split(File inputFile, File outputDirectory) throws IOException
inputFile
- outputDirectory
- IOException
public static void rotatePages(ImageInputStream imageInput, ImageOutputStream imageOutput, int degree) throws IOException
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.
imageInput
- imageOutput
- degree
- Rotation amount, supports 90�, 180� and 270�.IOException
public static void rotatePage(ImageInputStream imageInput, ImageOutputStream imageOutput, int degree, int pageIndex) throws IOException
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.
imageInput
- imageOutput
- degree
- Rotation amount, supports 90�, 180� and 270�.pageIndex
- page which should be rotated or -1 for all pages.IOException
public static List<TIFFUtilities.TIFFPage> getPages(ImageInputStream imageInput) throws IOException
IOException
public static void writePages(ImageOutputStream imageOutput, List<TIFFUtilities.TIFFPage> pages) throws IOException
IOException
public static BufferedImage applyOrientation(BufferedImage input, int orientation)
Copyright © 2017. All rights reserved.