com.java4less.qrcode
Class ImageEncoder

java.lang.Object
  extended by com.java4less.qrcode.ImageEncoder

public class ImageEncoder
extends java.lang.Object

use this class to export barcodes to GIF, JPG or PNG format. Example of use:

  new ImageEncoder(barcode,"PNG","c:\\barcode.png");

  Note that:
  - The GIF encoder must be downloaded from: http://www.acme.com/resources/classes/Acme.tar.gz
  - The PNG encoder must be downloaded from: png encoder from http://209.51.137.74/pngencoder-1.0.jar
  - In order to use the JPEG encoder you must have the package com.sun.image.codec.jpeg installed (It is only available for java 1.2 or later.).
  


Field Summary
 boolean result
           
 
Constructor Summary
ImageEncoder(QRCode c, java.lang.String psFormat, java.io.OutputStream os)
          Saves the current barcode to an output stream (gif , png or jpeg).
ImageEncoder(QRCode c, java.lang.String psFormat, java.lang.String psFile)
          Saves the current barcode to a graphics file (gif , png or jpeg).
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

result

public boolean result
Constructor Detail

ImageEncoder

public ImageEncoder(QRCode c,
                    java.lang.String psFormat,
                    java.lang.String psFile)
Saves the current barcode to a graphics file (gif , png or jpeg). The format can be "GIF", "PNG" or "JPEG".


ImageEncoder

public ImageEncoder(QRCode c,
                    java.lang.String psFormat,
                    java.io.OutputStream os)
Saves the current barcode to an output stream (gif , png or jpeg). The format can be "GIF", "PNG" or "JPEG".