Class PDFImageColorModel.SoftMask

java.lang.Object
com.inductiveautomation.rm.pdf.reader.PDFImageColorModel.SoftMask
Enclosing class:
PDFImageColorModel

protected static class PDFImageColorModel.SoftMask extends Object
A representation of the alpha channel. The SoftMask maintains a width, height, & bitspersample, since they do not necessarily have to be the same as the source image's. Can also contain a Matte array, which controls premultiplication of source color samples.
  • Field Details

    • width

      public int width
    • height

      public int height
    • bitspersample

      public int bitspersample
    • alphabits

      public byte[] alphabits
    • matte

      public float[] matte
  • Constructor Details

    • SoftMask

      public SoftMask(byte[] alpha, int w, int h, int bps, float[] marray)
      Create SoftMask.
  • Method Details

    • setSourceImageSize

      public void setSourceImageSize(int sw, int sh)
    • getAlpha

      public float getAlpha(int x, int y)
      returns the alpha value that would be mapped to the point in the source image. Since the image dimensions may not match the mask dimensions, these routines find the alpha value based on the sizes of the source and destination.
    • getUnnormalizedAlpha

      public int getUnnormalizedAlpha(int x, int y)