|
|||||||||
| Home >> All >> org >> jfor >> jfor >> tools >> [ jpeg overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jfor.jfor.tools.jpeg
Class Encoder

java.lang.Objectjava.awt.Component
org.jfor.jfor.tools.jpeg.Encoder
- All Implemented Interfaces:
- java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
- public class Encoder
- extends java.awt.Component
Encoder - The JPEG main program which performs a jpeg compression of an gif or tif image.
| Nested Class Summary |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
private DCT |
dct
|
private Huffman |
huf
|
static int[] |
jpegNaturalOrder
|
private JpegInfo |
jpegObj
|
private java.io.BufferedOutputStream |
outStream
|
private int |
quality
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
Encoder(int quality,
java.io.OutputStream out)
Constructor. |
|
| Method Summary | |
private void |
compress()
Compress the image and write to output stream. |
private void |
dispose()
Dispose. |
void |
encodeJPEG(byte[] data)
Encodes a JPEG. |
void |
encodeJPEG(java.awt.Image image)
Encodes a JPEG. |
void |
encodeJPEG(java.net.URL url)
Encodes a JPEG. |
int |
getQuality()
Gets the quality of jpeg image. |
static void |
main(java.lang.String[] args)
Main method |
private void |
process(java.awt.Image image)
Encode Image process. |
void |
setQuality(int quality)
Sets the quality of jpeg image. |
static void |
StandardUsage()
Standard usage method. |
private void |
WriteArray(byte[] data,
java.io.BufferedOutputStream out)
Writes a array. |
private void |
WriteCompressedData(java.io.BufferedOutputStream outputStream)
Writes the compressed data to the outputstream |
private void |
WriteEOI(java.io.BufferedOutputStream out)
Writes the End Of Image marker. |
private void |
WriteHeaders(java.io.BufferedOutputStream out)
Writes the header information. |
private void |
WriteMarker(byte[] data,
java.io.BufferedOutputStream out)
Writes a marker. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
outStream
private java.io.BufferedOutputStream outStream
jpegObj
private JpegInfo jpegObj
huf
private Huffman huf
dct
private DCT dct
quality
private int quality
jpegNaturalOrder
public static int[] jpegNaturalOrder
| Constructor Detail |
Encoder
public Encoder(int quality,
java.io.OutputStream out)
- Constructor.
| Method Detail |
encodeJPEG
public void encodeJPEG(java.awt.Image image) throws JPEGException
- Encodes a JPEG.
encodeJPEG
public void encodeJPEG(java.net.URL url) throws JPEGException
- Encodes a JPEG.
encodeJPEG
public void encodeJPEG(byte[] data)
throws JPEGException
- Encodes a JPEG.
process
private void process(java.awt.Image image) throws JPEGException
- Encode Image process.
getQuality
public int getQuality()
- Gets the quality of jpeg image.
return A value between 0 and 100
setQuality
public void setQuality(int quality)
- Sets the quality of jpeg image.
dispose
private void dispose()
- Dispose.
compress
private void compress()
throws JPEGException
- Compress the image and write to output stream.
WriteEOI
private void WriteEOI(java.io.BufferedOutputStream out)
- Writes the End Of Image marker.
WriteHeaders
private void WriteHeaders(java.io.BufferedOutputStream out)
- Writes the header information.
WriteCompressedData
private void WriteCompressedData(java.io.BufferedOutputStream outputStream)
- Writes the compressed data to the outputstream
WriteMarker
private void WriteMarker(byte[] data,
java.io.BufferedOutputStream out)
- Writes a marker.
WriteArray
private void WriteArray(byte[] data,
java.io.BufferedOutputStream out)
- Writes a array.
main
public static void main(java.lang.String[] args)
- Main method
StandardUsage
public static void StandardUsage()
- Standard usage method.
|
|||||||||
| Home >> All >> org >> jfor >> jfor >> tools >> [ jpeg overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC