Holger's Java API

## com.antelmann.image
Class QRCoder

    java.lang.Object
      com.antelmann.image.QRCoder

    @ThirdParty(value="com.google.zxing.Writer")
    public class QRCoder

extends Object

just some convenient functions to wrap com.google.zxing.Writer for easy generation of QR codes

Since:
  18.09.2012, 14:38:12
Author:
  holger

Constructor Summary
`QRCoder()`

Method Summary
`static InputStream` `createGif(String code)`
`static InputStream` `createGif(String code, int resolution, Color foreground, Color background)`
`static BufferedImage` `generateQRCode(String code)`
`static BufferedImage` `generateQRCode(String code, Color foreground, Color background)`
`static BufferedImage` `generateQRCode(String code, int resolution)`
`static BufferedImage` `generateQRCode(String code, int resolution, Color foreground, Color background)` generates a QR Code image based on the given parameters using com.google.zxing library
`static String` `readCode(Image image)`
`static String` `readCode(InputStream binaryImage)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### QRCoder

    public QRCoder()

Method Detail

### readCode

    public static String readCode(InputStream binaryImage)
                           throws IOException,
                                  FormatException

  Throws:
    `IOException`
    `FormatException`

### readCode

    public static String readCode(Image image)
                           throws FormatException

  Throws:
    `FormatException`

### generateQRCode

    public static BufferedImage generateQRCode(String code)

  See Also:
    `generateQRCode(String, int, Color, Color)`

### generateQRCode

    public static BufferedImage generateQRCode(String code,
                                               int resolution)

  See Also:
    `generateQRCode(String, int, Color, Color)`

### generateQRCode

    public static BufferedImage generateQRCode(String code,
                                               Color foreground,
                                               Color background)

  See Also:
    `generateQRCode(String, int, Color, Color)`

### generateQRCode

    public static BufferedImage generateQRCode(String code,
                                               int resolution,
                                               Color foreground,
                                               Color background)

  generates a QR Code image based on the given parameters using com.google.zxing library

  Parameters:
    `code` - the text to be encoded
    `resolution` - determines the width and height of the resulting image
    `foreground` - specifies the foreground color of the image
    `background` - specifies the background color of the image

### createGif

    public static InputStream createGif(String code)
                                 throws IOException

  Throws:
    `IOException`

### createGif

    public static InputStream createGif(String code,
                                        int resolution,
                                        Color foreground,
                                        Color background)
                                 throws IOException

  Throws:
    `IOException`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads