Class JpegImageEncoder
java.lang.Object
org.pentaho.reporting.libraries.base.encoder.JpegImageEncoder
- All Implemented Interfaces:
- ImageEncoder
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidencodeImage(Image image, OutputStream outputStream) voidencodeImage(Image image, OutputStream outputStream, float quality, boolean encodeAlpha) Encodes the given image using the given encoder-specific quality and alpha-channel settings and writes the encoded image-data to the given stream.Returns the mime-type of the encoded data.static boolean
- 
Constructor Details- 
JpegImageEncoderpublic JpegImageEncoder()
 
- 
- 
Method Details- 
encodeImagepublic void encodeImage(Image image, OutputStream outputStream, float quality, boolean encodeAlpha) throws IOException, UnsupportedEncoderException Description copied from interface:ImageEncoderEncodes the given image using the given encoder-specific quality and alpha-channel settings and writes the encoded image-data to the given stream.- Specified by:
- encodeImagein interface- ImageEncoder
- Parameters:
- image- the image to be encoded.
- outputStream- the output stream, where to write the image data to.
- quality- the quality of the encoding.
- encodeAlpha- a flag controlling whether the alpha-channel should be encoded as well.
- Throws:
- IOException- if there was an IO error while generating or writing the image data.
- UnsupportedEncoderException- if the encoder is not supported.
 
- 
encodeImagepublic void encodeImage(Image image, OutputStream outputStream) throws IOException, UnsupportedEncoderException 
- 
getMimeTypeDescription copied from interface:ImageEncoderReturns the mime-type of the encoded data.- Specified by:
- getMimeTypein interface- ImageEncoder
- Returns:
- the mime-type.
 
- 
isJpegEncodingAvailablepublic static boolean isJpegEncodingAvailable()
 
-