Package com.idrsolutions.image.jpeg2000
Class Jpeg2000Encoder
java.lang.Object
com.idrsolutions.image.JDeliImage
com.idrsolutions.image.jpeg2000.Jpeg2000Encoder
- All Implemented Interfaces:
com.idrsolutions.image.Encoder
public class Jpeg2000Encoder
extends com.idrsolutions.image.JDeliImage
implements com.idrsolutions.image.Encoder
Class writes BufferedImages as JPEG2000
Example:
Jpeg2000Encoder encoder = new Jpeg2000Encoder();
//encoder.getEncoderOptions().setQuality(75); //default is 75
encoder.write(bufferedImage, outputStream);
-
Field Summary
Fields inherited from class com.idrsolutions.image.JDeliImage
bb
-
Constructor Summary
ConstructorDescriptionJpeg2000Encoder
(com.idrsolutions.image.encoder.options.EncoderOptions format) -
Method Summary
Modifier and TypeMethodDescriptionint
Deprecated.void
setQuality
(int percentage) Deprecated.usevoid
write
(BufferedImage image, File file) Writes BufferedImage as JPEG2000 to a filevoid
write
(BufferedImage inputImage, OutputStream os) Writes BufferedImage as JPEG2000 to an OutputStreamMethods inherited from class com.idrsolutions.image.JDeliImage
optimiseImage
-
Constructor Details
-
Jpeg2000Encoder
public Jpeg2000Encoder(com.idrsolutions.image.encoder.options.EncoderOptions format) -
Jpeg2000Encoder
public Jpeg2000Encoder()
-
-
Method Details
-
getEncoderOptions
- Specified by:
getEncoderOptions
in interfacecom.idrsolutions.image.Encoder
-
write
Writes BufferedImage as JPEG2000 to a file- Parameters:
image
- BufferedImage The image to writefile
- The output file to write to- Throws:
IOException
- if the image wasn't written
-
write
Writes BufferedImage as JPEG2000 to an OutputStreamThis method does not close the provided OutputStream after the write operation has completed; it is the responsibility of the caller to close the stream.
- Specified by:
write
in interfacecom.idrsolutions.image.Encoder
- Parameters:
os
- The stream to write to- Throws:
IOException
- if the image wasn't written
-
setQuality
Deprecated.usejpeg2000EncoderOptions.setQuality(int percentage); setEncoderOptions(jpeg2000EncoderOptions);
- Parameters:
percentage
- setting used for level of compression
-
getQuality
Deprecated.- usegetEncoderOptions().getQuality();
- Returns:
- setting used for level of compression
-
getEncoderOptions().getQuality();