Package com.idrsolutions.image.webp
Class WebpEncoder
java.lang.Object
com.idrsolutions.image.JDeliImage
com.idrsolutions.image.webp.WebpEncoder
- All Implemented Interfaces:
com.idrsolutions.image.Encoder
public class WebpEncoder
extends com.idrsolutions.image.JDeliImage
implements com.idrsolutions.image.Encoder
Class writes BufferedImages as WEBP
Example:
WebpEncoder encoder = new WebpEncoder();
encoder.write(bufferedImage, outputStream);
-
Field Summary
Fields inherited from class com.idrsolutions.image.JDeliImage
bb
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
write
(BufferedImage image, File file) Writes BufferedImage as WEBP to a filevoid
write
(BufferedImage inputImage, OutputStream os) Writes BufferedImage as WEBP to an OutputStreamMethods inherited from class com.idrsolutions.image.JDeliImage
optimiseImage
-
Constructor Details
-
WebpEncoder
public WebpEncoder(com.idrsolutions.image.encoder.options.EncoderOptions format) -
WebpEncoder
public WebpEncoder()
-
-
Method Details
-
write
Writes BufferedImage as WEBP 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 WEBP 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:
inputImage
- image to writeos
- The stream to write to- Throws:
IOException
- if the image wasn't written
-
getEncoderOptions
- Specified by:
getEncoderOptions
in interfacecom.idrsolutions.image.Encoder
-