Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Multivalent API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## multivalent.std.adaptor.pdf
Class Images

    java.lang.Object
      multivalent.std.adaptor.pdf.Images

public class Images
extends java.lang.Object

Interpret PDF image types, from objects or inline (content stream): DCT (JPEG), JPX (JPEG2000), CCITT FAX (Group 3, Group 3 2D, Group 4), raw samples (bit depth 1,2,4,8), JBIG2. Does no cacheing; always creates new image.

Version:
  $Revision: 1.89 $ $Date: 2005/07/26 20:25:46 $
See Also:
  `javax.imageio`, `Fax`

Method Summary
`static java.awt.image.BufferedImage` | `createImage(Dict imgdict, java.io.InputStream is, java.awt.geom.AffineTransform ctm, java.awt.Color fillcolor, PDFReader pdfr)` Constructs new BufferedImage from dictionary attributes and data in stream.
`static java.awt.image.BufferedImage` | `createInline(InputStreamComposite is, Dict csres, java.awt.geom.AffineTransform ctm, java.awt.Color fillcolor, PDFReader pdfr)` Process inline image into Node.
`static double[]` | `getDecode(Dict imgdict, COSSource coss)`
`static Dict` | `getDecodeParms(Dict imgdict, PDFReader pdfr)` Returns image's /DecodeParms, or `null` if none (or `COS.OBJECT_NULL`).
`static java.lang.String` | `getFilter(Dict imgdict, COSSource coss)` Return image part of filter, which may be in a cascade, or `null` if none.
`static java.lang.String` | `getSuffix(java.lang.String filter)` Returns file type suffix corresponding to PDF filter, e.g., PDF `DCTDecode` returns `jpg`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### createImage

    public static java.awt.image.BufferedImage createImage(Dict imgdict,
                                                           java.io.InputStream is,
                                                           java.awt.geom.AffineTransform ctm,
                                                           java.awt.Color fillcolor,
                                                           PDFReader pdfr)
                                                    throws java.io.IOException

  Constructs new BufferedImage from dictionary attributes and data in stream. Applies ctm, adjusting image origin from PDF lower-left to Java upper-left.

  Parameters:
    `imgdict` - image XObject, or Dict with `#STREAM_DATA` key set for inline images
  Throws:
    `java.io.IOException`

### createInline

    public static java.awt.image.BufferedImage createInline(InputStreamComposite is,
                                                            Dict csres,
                                                            java.awt.geom.AffineTransform ctm,
                                                            java.awt.Color fillcolor,
                                                            PDFReader pdfr)
                                                     throws java.io.IOException

  Process inline image into Node.

  Throws:
    `java.io.IOException`

### getFilter

    public static java.lang.String getFilter(Dict imgdict,
                                             COSSource coss)
                                      throws java.io.IOException

  Return image part of filter, which may be in a cascade, or `null` if none. Expands abbreviations ("DCT" => "DCTDecode", "CCF" => "CCITTFaxDecode"). For example, from `[ASCII85Decode CCF]`, returns `CCITTFaxDecode`.

  Throws:
    `java.io.IOException`

### getDecode

    public static double[] getDecode(Dict imgdict,
                                     COSSource coss)
                              throws java.io.IOException

  Throws:
    `java.io.IOException`

### getDecodeParms

    public static Dict getDecodeParms(Dict imgdict,
                                      PDFReader pdfr)
                               throws java.io.IOException

  Returns image's /DecodeParms, or `null` if none (or `COS.OBJECT_NULL`). If /DecodeParms is an array, the one corresponding to the image is always the last array element.

  Throws:
    `java.io.IOException`

### getSuffix

    public static java.lang.String getSuffix(java.lang.String filter)

  Returns file type suffix corresponding to PDF filter, e.g., PDF `DCTDecode` returns `jpg`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Multivalent API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD