|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bbn.openmap.image.AcmeJPEGHelper
This class provides some utility methods for creating jpeg encoded images. It relies on the Acme Encoders, available at http://www.acme.com. A copy has been included in the contrib directory.
Method Summary | |
static byte[] |
encodeJPEG(java.awt.image.BufferedImage image,
int quality)
Return a byte array that contains the JPEG encoded image. |
static byte[] |
encodeJPEG(int w,
int h,
int[] pixels,
int 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, int quality) throws java.io.IOException
image
- the image to encodequality
- the JPEG quality factor to use in encoding 1-100
java.io.IOException
- an error occured in encoding the imagepublic static byte[] encodeJPEG(int w, int h, int[] pixels, int 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 imagepublic 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 |