Class QrCodeServiceImpl

java.lang.Object
ch.tocco.nice2.templating.impl.qr.QrCodeServiceImpl
All Implemented Interfaces:
QrCodeService

@Component public class QrCodeServiceImpl extends Object implements QrCodeService
  • Constructor Details

    • QrCodeServiceImpl

      public QrCodeServiceImpl()
  • Method Details

    • createCodeImage

      public BufferedImage createCodeImage(String data, int size, boolean overlay) throws com.google.zxing.WriterException, IOException
      Description copied from interface: QrCodeService
      encodes the given data into a qr code of the given size. Note: This service does not ensure that the qr code is readable. if the given size is too small, the generated qr code may be unreadable.
      Specified by:
      createCodeImage in interface QrCodeService
      Parameters:
      data - the data to encode
      size - the desired size of the generated code
      Returns:
      the generated qr code image
      Throws:
      com.google.zxing.WriterException
      IOException