com.java4less.microqrcode
Class ImageEncoder
java.lang.Object
com.java4less.microqrcode.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.).
Constructor Summary |
ImageEncoder(MicroQRCode c,
java.lang.String psFormat,
java.io.OutputStream os)
Saves the current barcode to an output stream (gif , png or jpeg). |
ImageEncoder(MicroQRCode c,
java.lang.String psFormat,
java.lang.String psFile)
Saves the current barcode to a graphics file (gif , png or jpeg). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
result
public boolean result
ImageEncoder
public ImageEncoder(MicroQRCode 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(MicroQRCode 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".