|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.crionics.jpdf.graphic.ImageConvertor
public final class ImageConvertor
This class is a Facade to the different techniques to load Images in Java. Depending on the JDK version of use, different methods may prevail (MediaTracker, ImageIO, JAI, JPEGCodec..etc). This class takes care of the job for you and will pick the most appropriate method. By default, this class will support JPEG and GIF formats. JDK 1.4 and above adds support for PNG along with many other formats supported through the ImageIO plug-ins (TIFF, BMP, JPEG 2000..etc.) See https://jai-imageio.dev.java.net/ for more details about ImageIO plugins.
| Method Summary | |
|---|---|
static ImageConvertor |
getInstance()
singleton pattern, return a single instance on the object |
AbstractImage |
loadImage(java.io.File imageFile)
Creates an image object from the specified File. |
AbstractImage |
loadImage(java.awt.Image image)
Creates an image object from the specified AWT Image. |
AbstractImage |
loadImage(java.lang.String imageFilename)
Creates an image object from the specified filename. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ImageConvertor getInstance()
public AbstractImage loadImage(java.io.File imageFile)
throws java.io.IOException
imageFile - The Image File.
java.io.IOException - Raised if a problem occured while reading the file.public AbstractImage loadImage(java.awt.Image image)
image - The AWT Image.
public AbstractImage loadImage(java.lang.String imageFilename)
throws java.io.IOException
imageFilename - The Image Filename.
java.io.IOException - Raised if a problem occured while reading the file.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||