Class MatrixToImageConfig

java.lang.Object
com.google.zxing.client.j2se.MatrixToImageConfig

public final class MatrixToImageConfig extends Object
Encapsulates custom configuration used in methods of MatrixToImageWriter.
  • Field Details

    • BLACK

      public static final int BLACK
      See Also:
    • WHITE

      public static final int WHITE
      See Also:
    • onColor

      private final int onColor
    • offColor

      private final int offColor
  • Constructor Details

    • MatrixToImageConfig

      public MatrixToImageConfig()
      Creates a default config with on color BLACK and off color WHITE, generating normal black-on-white barcodes.
    • MatrixToImageConfig

      public MatrixToImageConfig(int onColor, int offColor)
      Parameters:
      onColor - pixel on color, specified as an ARGB value as an int
      offColor - pixel off color, specified as an ARGB value as an int
  • Method Details

    • getPixelOnColor

      public int getPixelOnColor()
    • getPixelOffColor

      public int getPixelOffColor()
    • getBufferedImageColorModel

      int getBufferedImageColorModel()
    • hasTransparency

      private static boolean hasTransparency(int argb)