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 Details

    • 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:
    • 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:
    • 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:
    • BUFFERED_IMAGE_FACTORY

      public static final String BUFFERED_IMAGE_FACTORY
      See Also:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
  • Constructor Details

    • ImagingConstants

      private ImagingConstants()