Holger's
Java API

com.antelmann.imagedb
Class ImageUtils

java.lang.Object
  extended by com.antelmann.imagedb.ImageUtils
All Implemented Interfaces:
ThirdParty

public class ImageUtils
extends Object
implements ThirdParty

implements ThirdParty for the use of net.sourceforge.barbecue

Author:
Holger Antelmann

Method Summary
static void copyToClipboard(Image image)
           
static BufferedImage generateBarcodeImage(String code, String type, boolean showLabel)
          if type is null, Code128 is assumed.
static BufferedImage generateTextImage(String text)
          generates an image based on the given text.
static BufferedImage generateTextImage(String text, Font font, Color textColor, Color backgroundColor, boolean antiAlias)
          generates an image based on the given text.
static Image pasteFromClipboard()
          returns null if the clipboard content cannot be read into an image
static BufferedImage renderImage(Image image)
          allows to convert an Image to a BufferedImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

generateBarcodeImage

public static BufferedImage generateBarcodeImage(String code,
                                                 String type,
                                                 boolean showLabel)
                                          throws NoSuchMethodException,
                                                 IllegalAccessException,
                                                 InvocationTargetException
if type is null, Code128 is assumed.

Throws:
NoSuchMethodException
IllegalAccessException
InvocationTargetException
See Also:
BarcodeFactory

pasteFromClipboard

public static Image pasteFromClipboard()
returns null if the clipboard content cannot be read into an image


copyToClipboard

public static void copyToClipboard(Image image)

generateTextImage

public static BufferedImage generateTextImage(String text)
generates an image based on the given text. Uses black on white w/ the default font and no antiAlias.


generateTextImage

public static BufferedImage generateTextImage(String text,
                                              Font font,
                                              Color textColor,
                                              Color backgroundColor,
                                              boolean antiAlias)
generates an image based on the given text. Particularly useful for web apps.

Parameters:
font - may be null (in which case the default font is used)

renderImage

public static BufferedImage renderImage(Image image)
allows to convert an Image to a BufferedImage



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