Class ImageWriterParams
- java.lang.Object
-
- org.apache.batik.ext.awt.image.spi.ImageWriterParams
-
public class ImageWriterParams extends java.lang.ObjectParameters for the encoder which is accessed through the ImageWriter interface.- Version:
- $Id: ImageWriterParams.java 1802297 2017-07-18 13:58:12Z ssteiner $
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringcompressionMethodprivate java.lang.BooleanjpegForceBaselineprivate java.lang.FloatjpegQualityprivate java.lang.Integerresolution
-
Constructor Summary
Constructors Constructor Description ImageWriterParams()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCompressionMethod()java.lang.BooleangetJPEGForceBaseline()java.lang.FloatgetJPEGQuality()java.lang.IntegergetResolution()voidsetCompressionMethod(java.lang.String method)Set the compression method that shall be used to encode the image.voidsetJPEGQuality(float quality, boolean forceBaseline)Sets the quality setting for encoding JPEG images.voidsetResolution(int dpi)Sets the target resolution of the bitmap image to be written.
-
-
-
Method Detail
-
getResolution
public java.lang.Integer getResolution()
- Returns:
- the image resolution in dpi, or null if undefined
-
getJPEGQuality
public java.lang.Float getJPEGQuality()
- Returns:
- the quality value for encoding a JPEG image (0.0-1.0), or null if undefined
-
getJPEGForceBaseline
public java.lang.Boolean getJPEGForceBaseline()
- Returns:
- true if the baseline quantization table is forced, or null if undefined.
-
getCompressionMethod
public java.lang.String getCompressionMethod()
- Returns:
- the compression method for encoding the image
-
setResolution
public void setResolution(int dpi)
Sets the target resolution of the bitmap image to be written.- Parameters:
dpi- the resolution in dpi
-
setJPEGQuality
public void setJPEGQuality(float quality, boolean forceBaseline)Sets the quality setting for encoding JPEG images.- Parameters:
quality- the quality setting (0.0-1.0)forceBaseline- force baseline quantization table
-
setCompressionMethod
public void setCompressionMethod(java.lang.String method)
Set the compression method that shall be used to encode the image.- Parameters:
method- the compression method
-
-