Class PdfSubByteSampleModel

java.lang.Object
java.awt.image.SampleModel
org.openpdf.renderer.PdfSubByteSampleModel

public class PdfSubByteSampleModel extends SampleModel
Provides a read-only sample-model where components are less than a byte in width while allowing for pixels to cross byte-boundaries. For example, this allows 2 pixels made of 3 4-bit-bands (p[pixel,band]) to be stored in 3 bytes as p[0,1] p[0,2] | p[0,3] p[1,0] | p[1,1] p[1,2]. MultiPixelPackedSampleModel, which allows for sub-byte components, does not allow for such byte spanning, while the PDF specification does permit it -- hence the existence of this class.
  • Field Details

    • transferBytesPerPixel

      private final int transferBytesPerPixel
    • storageBitsPerPixel

      private final int storageBitsPerPixel
    • bitsPerLine

      private final int bitsPerLine
    • bitsPerBand

      private final int bitsPerBand
    • componentMask

      private final int componentMask
    • sampleSize

      private final int[] sampleSize
    • ignoredBitsPerComponentPerByte

      private final int ignoredBitsPerComponentPerByte
  • Constructor Details

    • PdfSubByteSampleModel

      public PdfSubByteSampleModel(int w, int h, int numComponents, int bitsPerComponent)
  • Method Details