Save This Page
Home » jcommon-1.0.13 » org.jfree » chart » encoders » [javadoc | source]
org.jfree.chart.encoders
public class: SunJPEGEncoderAdapter [javadoc | source]
java.lang.Object
   org.jfree.chart.encoders.SunJPEGEncoderAdapter

All Implemented Interfaces:
    ImageEncoder

Adapter class for the Sun JPEG Encoder. The ImageEncoderFactory will only return a reference to this class by default if the library has been compiled under a JDK 1.4+ and is being run using a JRE 1.4+.
Constructor:
 public SunJPEGEncoderAdapter() 
Method from org.jfree.chart.encoders.SunJPEGEncoderAdapter Summary:
encode,   encode,   getQuality,   isEncodingAlpha,   setEncodingAlpha,   setQuality
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.chart.encoders.SunJPEGEncoderAdapter Detail:
 public byte[] encode(BufferedImage bufferedImage) throws IOException 
    Encodes an image in JPEG format.
 public  void encode(BufferedImage bufferedImage,
    OutputStream outputStream) throws IOException 
    Encodes an image in JPEG format and writes it to an output stream.
 public float getQuality() 
    Returns the quality of the image encoding, which is a number in the range 0.0f to 1.0f (higher values give better quality output, but larger file sizes). The default value is 0.95f.
 public boolean isEncodingAlpha() 
    Returns false always, indicating that this encoder does not encode alpha transparency.
 public  void setEncodingAlpha(boolean encodingAlpha) 
    Set whether the encoder should encode alpha transparency (this is not supported for JPEG, so this method does nothing).
 public  void setQuality(float quality) 
    Set the quality of the image encoding.