com.asprise.util.tiff
Class TIFFReader

java.lang.Object
  extended bycom.asprise.util.tiff.TIFFReader

public class TIFFReader
extends java.lang.Object

A 'Reader' for TIFF format, which can extract pages into RenderedImages.


Constructor Summary
TIFFReader(java.io.File tiffFile)
          Creates a TIFF reader on the specified file.
 
Method Summary
 int countPages()
          Returns the total number pages in the TIFF file.
 java.awt.image.RenderedImage getPage(int index)
          Returns an image that contains the decoded contents of the specified page of the TIFF. 0 refer to the first page, 1 to the second, and so on.
static void main(java.lang.String[] args)
          This is a utility that takes a TIFF file and saves each of the pages into separate JPEG files into the specified directory.
static boolean setFileHidden_Windows(java.io.File file, boolean hidden)
          Sets the specified file to be hidden or not - Windows only.
static boolean setFileReadOnly_Windows(java.io.File file, boolean readonly)
          Sets the specified file to be read-only or not - Windows only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TIFFReader

public TIFFReader(java.io.File tiffFile)
           throws java.io.IOException
Creates a TIFF reader on the specified file.

Parameters:
tiffFile -
Throws:
java.io.IOException
Method Detail

getPage

public java.awt.image.RenderedImage getPage(int index)
                                     throws java.io.IOException
Returns an image that contains the decoded contents of the specified page of the TIFF. 0 refer to the first page, 1 to the second, and so on.

Parameters:
index -
Returns:
Throws:
java.io.IOException

countPages

public int countPages()
Returns the total number pages in the TIFF file.

Returns:

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
This is a utility that takes a TIFF file and saves each of the pages into separate JPEG files into the specified directory.

Parameters:
args -
Throws:
java.io.IOException

setFileHidden_Windows

public static boolean setFileHidden_Windows(java.io.File file,
                                            boolean hidden)
Sets the specified file to be hidden or not - Windows only.

Parameters:
hidden -
Returns:
true if no execption is thrown during command execution, false otherwise.

setFileReadOnly_Windows

public static boolean setFileReadOnly_Windows(java.io.File file,
                                              boolean readonly)
Sets the specified file to be read-only or not - Windows only.

Parameters:
readonly -
Returns:
true if no execption is thrown during command execution, false otherwise.