|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.bbn.openmap.image.JPEGHelper
This class provides some utility methods for creating jpeg encoded images. It relies on the Sun JDK/SDK JPEG codec classes.
| Method Summary | |
static byte[] |
encodeJPEG(java.awt.image.BufferedImage image,
float quality)
Return a byte array that contains the JPEG encoded image. |
static byte[] |
encodeJPEG(int w,
int h,
int[] pixels,
float quality)
Return a byte array that contains the JPEG encoded image. |
static void |
main(java.lang.String[] args)
A test main that encodes an image url at various jpeg quality factors. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static byte[] encodeJPEG(java.awt.image.BufferedImage image,
float quality)
throws java.io.IOException
image - the image to encodequality - the JPEG quality factor to use in encoding
java.io.IOException - an error occured in encoding the image
public static byte[] encodeJPEG(int w,
int h,
int[] pixels,
float quality)
throws java.io.IOException
w - the width of the imageh - the height of the imagepixels - the array of pixels in RGB directcolorquality - the JPEG quality factor to use in encoding
java.io.IOException - an error occured in encoding the image
public static void main(java.lang.String[] args)
throws java.lang.Exception
args - url [width height]
java.lang.Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||