Class BarcodeEncoder


  • public class BarcodeEncoder
    extends Object
    Helper class for encoding barcodes as a Bitmap. Adapted from QRCodeEncoder, from the zxing project: https://github.com/zxing/zxing Licensed under the Apache License, Version 2.0.
    • Constructor Detail

      • BarcodeEncoder

        public BarcodeEncoder()
    • Method Detail

      • createBitmap

        public Bitmap createBitmap​(com.google.zxing.common.BitMatrix matrix)
      • encode

        public com.google.zxing.common.BitMatrix encode​(String contents,
                                                        com.google.zxing.BarcodeFormat format,
                                                        int width,
                                                        int height)
                                                 throws com.google.zxing.WriterException
        Throws:
        com.google.zxing.WriterException
      • encode

        public com.google.zxing.common.BitMatrix encode​(String contents,
                                                        com.google.zxing.BarcodeFormat format,
                                                        int width,
                                                        int height,
                                                        Map<com.google.zxing.EncodeHintType,​?> hints)
                                                 throws com.google.zxing.WriterException
        Throws:
        com.google.zxing.WriterException
      • encodeBitmap

        public Bitmap encodeBitmap​(String contents,
                                   com.google.zxing.BarcodeFormat format,
                                   int width,
                                   int height)
                            throws com.google.zxing.WriterException
        Throws:
        com.google.zxing.WriterException
      • encodeBitmap

        public Bitmap encodeBitmap​(String contents,
                                   com.google.zxing.BarcodeFormat format,
                                   int width,
                                   int height,
                                   Map<com.google.zxing.EncodeHintType,​?> hints)
                            throws com.google.zxing.WriterException
        Throws:
        com.google.zxing.WriterException