|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.faceless.pdf2.PDFImageSet
The PDFImageSet
class is a thin wrapper around a multi-page
image format (currently only TIFF images). Although it can be used with
single page images, it's simpler just to create a PDFImage
directly.
PDFImageSet tiff = new PDFImageSet(new FileInputStream("multipage.tif")); PDFImage page1 = tiff.getImage(1); PDFImage page2 = tiff.getImage(2);
PDFImage
Constructor Summary | |
PDFImageSet(InputStream in)
Create a new PDFImageSet from the specified InputStream.
|
Method Summary | |
void |
close()
Close all of the images in this Image set. |
PDFImage |
getImage(int page)
Return the specified sub-image from this image as a PDFImage .
|
int |
getNumImages()
Return the number of sub images, or "pages" in this image set. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PDFImageSet(InputStream in) throws IOException, IllegalArgumentException
PDFImageSet
from the specified InputStream.
The stream must contain a recognized Image format - see the PDFImage
class for a list of formats and restrictions
IOException
- if the image cannot be loaded or the format cannot be parsed
IllegalArgumentException
- if the image cannot be parsedMethod Detail |
public int getNumImages()
public PDFImage getImage(int page) throws IOException
PDFImage
.
If the requested page is out of range this method throws an
ArrayIndexOutOfBoundsException
. If the specified subimage
is corrupt or cannot be parsed, throws an IOException
page
- the page number, from 0 to getNumImages()
IOException
- if the TIFF file is corrupt or the image cannot be used
ArrayIndexOutOfBoundsException
public void close()
PDFImage.close()
method for all of the images.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |