Package org.apache.commons.imaging.formats.tiff.photometricinterpreters

# Class AbstractPhotometricInterpreter

java.lang.Object
org.apache.commons.imaging.formats.tiff.photometricinterpreters.AbstractPhotometricInterpreter

Direct Known Subclasses:
  `PhotometricInterpreterBiLevel`, `PhotometricInterpreterCieLab`, `PhotometricInterpreterCmyk`, `PhotometricInterpreterFloat`, `PhotometricInterpreterLogLuv`, `PhotometricInterpreterPalette`, `PhotometricInterpreterRgb`, `PhotometricInterpreterYCbCr`

public abstract class AbstractPhotometricInterpreter extends Object
Interpreter for photometric information in TIFF images. The photometric interpretation tag is a requirement for valid TIFF images, and defines the color space of the image data.

See Also:
  - Baseline TIFF Tag PhotometricInterpretation

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final int`
  `height`
  `protected final int`
  `predictor`
  `protected final int`
  `samplesPerPixel`
  `protected final int`
  `width`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractPhotometricInterpreter(int samplesPerPixel, int[] bitsPerSample, int predictor, int width, int height)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected int`
  `getBitsPerSample(int offset)`
  `abstract void`
  `interpretPixel(ImageBuilder imageBuilder, int[] samples, int x, int y)`

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

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

- ## Field Details

  - ### samplesPerPixel

    protected final int samplesPerPixel

  - ### predictor

    protected final int predictor

  - ### width

    protected final int width

  - ### height

    protected final int height

- ## Constructor Details

  - ### AbstractPhotometricInterpreter

    public AbstractPhotometricInterpreter(int samplesPerPixel, int[] bitsPerSample, int predictor, int width, int height)

- ## Method Details

  - ### getBitsPerSample

    protected int getBitsPerSample(int offset)

  - ### interpretPixel

    public abstract void interpretPixel(ImageBuilder imageBuilder, int[] samples, int x, int y) throws ImagingException, IOException
    Throws:
      `ImagingException`
      `IOException`