com.quadrique.jbuildingblocks.core.image
Class JbbImageHandler

java.lang.Object
  extended by com.quadrique.jbuildingblocks.core.image.JbbImageHandler

public class JbbImageHandler
extends Object

Author:
dkumbham

Method Summary
 org.apache.xmlgraphics.image.loader.Image convertImageToBmp(String uri)
          returns the converted bitmap image.
 org.apache.xmlgraphics.image.loader.Image getImage(String uri, org.apache.xmlgraphics.image.loader.ImageFlavor flavor)
          load an image in a given flavor.
 org.apache.xmlgraphics.image.loader.ImageInfo getImageInfo(String uri)
          returns ImageInfo object.
static JbbImageHandler newInstance()
           
 void saveAs(BufferedImage image, String outputFile, String format)
          use it to convert bmp to PNG.
 void saveAsJpeg(BufferedImage image, String outputFile)
          write to Jpeg.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static JbbImageHandler newInstance()
Returns:
a new instance

getImageInfo

public org.apache.xmlgraphics.image.loader.ImageInfo getImageInfo(String uri)
                                                           throws Exception
returns ImageInfo object. This is like preloading the image ( meta information ).

Parameters:
uri -
Returns:
Throws:
Exception

getImage

public org.apache.xmlgraphics.image.loader.Image getImage(String uri,
                                                          org.apache.xmlgraphics.image.loader.ImageFlavor flavor)
                                                   throws Exception
load an image in a given flavor.

Parameters:
uri -
flavor -
Returns:
Throws:
Exception

convertImageToBmp

public org.apache.xmlgraphics.image.loader.Image convertImageToBmp(String uri)
                                                            throws Exception
returns the converted bitmap image.

Parameters:
uri -
Returns:
Throws:
Exception

saveAs

public void saveAs(BufferedImage image,
                   String outputFile,
                   String format)
            throws Exception
use it to convert bmp to PNG.

Parameters:
uri -
Throws:
Exception

saveAsJpeg

public void saveAsJpeg(BufferedImage image,
                       String outputFile)
                throws Exception
write to Jpeg.

Parameters:
uri -
Throws:
Exception


Copyright © 2001-2008 Quadrique Corporation. All Rights Reserved.