Package com.idrsolutions.image.bmp
Class BmpEncoder
java.lang.Object
com.idrsolutions.image.JDeliImage
com.idrsolutions.image.bmp.BmpEncoder
- All Implemented Interfaces:
com.idrsolutions.image.Encoder
public class BmpEncoder
extends com.idrsolutions.image.JDeliImage
implements com.idrsolutions.image.Encoder
Class writes BufferedImages as BMP
Example:
BmpEncoder encoder = new BmpEncoder();
encoder.write(image, outputStream);
-
Field Summary
Fields inherited from class com.idrsolutions.image.JDeliImage
bb
-
Constructor Summary
ConstructorDescriptionBmpEncoder
(com.idrsolutions.image.encoder.options.EncoderOptions format) Sets up the options so they can be used when encoding -
Method Summary
Modifier and TypeMethodDescriptionvoid
write
(BufferedImage image, OutputStream outputStream) Writes BufferedImage as a BMP into an OutputStreamMethods inherited from class com.idrsolutions.image.JDeliImage
optimiseImage
-
Constructor Details
-
BmpEncoder
public BmpEncoder(com.idrsolutions.image.encoder.options.EncoderOptions format) Sets up the options so they can be used when encoding- Parameters:
format
- EncoderOptions
-
BmpEncoder
public BmpEncoder()
-
-
Method Details
-
getEncoderOptions
- Specified by:
getEncoderOptions
in interfacecom.idrsolutions.image.Encoder
-
write
Writes BufferedImage as a BMP into 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:
image
- BufferedImage to writeoutputStream
- The stream to write the image to- Throws:
IOException
- if the image wasn't written
-