org.apache.commons.imaging

## Class ImagingConstants

- java.lang.Object
- - org.apache.commons.imaging.ImagingConstants

-     public final class ImagingConstants
      extends Object

  Defines constants that may be used in passing options to ImageParser read/write implementations, the utility routines implemented in the Imaging class, and throughout the Apache Commons Imaging package. Individual ImageParser implementations may define their own format-specific options.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `BUFFERED_IMAGE_FACTORY`
    `static String` | `PARAM_KEY_COMPRESSION` Parameter key.
    `static String` | `PARAM_KEY_EXIF` Parameter key.
    `static String` | `PARAM_KEY_FILENAME` Parameter key.
    `static String` | `PARAM_KEY_FORMAT` Parameter key.
    `static String` | `PARAM_KEY_PIXEL_DENSITY` Parameter key.
    `static String` | `PARAM_KEY_READ_THUMBNAILS` Parameter key.
    `static String` | `PARAM_KEY_STRICT` Parameter key.
    `static String` | `PARAM_KEY_XMP_XML` Parameter key.

  - ### Method Summary

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PARAM_KEY_FILENAME

          public static final String PARAM_KEY_FILENAME

      Parameter key. Used to hint the file name when reading from a byte array or InputStream. The file name hint can help disambiguate what file the image format.

      Applies to read operations.

      Valid values: file name as string

      See Also:
        `InputStream`, Constant Field Values

    - #### PARAM_KEY_FORMAT

          public static final String PARAM_KEY_FORMAT

      Parameter key. Used in write operations to indicate desired image format.

      Valid values: Any format defined in ImageFormat, such as ImageFormat.IMAGE_FORMAT_PNG.

      See Also:
        `ImageFormats`, Constant Field Values

    - #### PARAM_KEY_COMPRESSION

          public static final String PARAM_KEY_COMPRESSION

      Parameter key. Used in write operations to indicate desired compression algorithm.

      Currently only applies to writing TIFF image files.

      Valid values: `TiffConstants.TIFF_COMPRESSION_UNCOMPRESSED, TiffConstants.TIFF_COMPRESSION_CCITT_1D, TiffConstants.TIFF_COMPRESSION_LZW, TiffConstants.TIFF_COMPRESSION_PACKBITS.`

      See Also:
        `TiffConstants`, Constant Field Values

    - #### BUFFERED_IMAGE_FACTORY

          public static final String BUFFERED_IMAGE_FACTORY

      See Also:
        Constant Field Values

    - #### PARAM_KEY_READ_THUMBNAILS

          public static final String PARAM_KEY_READ_THUMBNAILS

      Parameter key. Indicates whether to read embedded thumbnails.

      Only applies to read EXIF metadata from JPEG/JFIF files.

      Valid values: `Boolean.TRUE` and `Boolean.FALSE`.

      See Also:
        `TiffConstants`, Constant Field Values

    - #### PARAM_KEY_STRICT

          public static final String PARAM_KEY_STRICT

      Parameter key. Indicates whether to throw exceptions when parsing invalid files, or whether to tolerate small problems.

      Valid values: `Boolean.TRUE` and `Boolean.FALSE`. Default value: `Boolean.FALSE`.

      See Also:
        `TiffConstants`, Constant Field Values

    - #### PARAM_KEY_EXIF

          public static final String PARAM_KEY_EXIF

      Parameter key.

      Only used when writing images.

      Valid values: TiffOutputSet to write into the image's EXIF metadata.

      See Also:
        `TiffOutputSet`, Constant Field Values

    - #### PARAM_KEY_XMP_XML

          public static final String PARAM_KEY_XMP_XML

      Parameter key.

      Only used when writing images.

      Valid values: String of XMP XML.

      See Also:
        Constant Field Values

    - #### PARAM_KEY_PIXEL_DENSITY

          public static final String PARAM_KEY_PIXEL_DENSITY

      Parameter key. Used in write operations to indicate the desired pixel density (DPI), and/or aspect ratio.

      Valid values: PixelDensity

      See Also:
        `PixelDensity`, Constant Field Values

Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.