javax.imageio

Class ImageWriteParam

public class ImageWriteParam extends IIOParam

DOCUMENT ME
Field Summary
protected booleancanOffsetTiles
True if tiling grid offset parameters can be set.
protected booleancanWriteCompressed
True if this writer can write images using compression.
protected booleancanWriteProgressive
True if images can be written as a progressive sequence of increasing quality.
protected booleancanWriteTiles
True if tile width and height parameters can be set.
protected intcompressionMode
Controls compression settings, which must be set to one of the four MODE_* values.
protected floatcompressionQuality
Contains the current compression quality setting.
protected StringcompressionType
Contains the name of the current compression type.
protected String[]compressionTypes
Array of the names of the available compression types.
protected Localelocale
Localizes compression type names and quality descriptions, or null to use default Locale.
static intMODE_COPY_FROM_METADATA
Can be passed to setTilingMode, setProgressiveMode and setCompressionMode to enable feature.
static intMODE_DEFAULT
Can be passed to setTilingMode, setProgressiveMode and setCompressionMode to enable feature.
static intMODE_DISABLED
Can be passed to setTilingMode, setProgressiveMode and setCompressionMode to disable feature.
static intMODE_EXPLICIT
Can be passed to setTilingMode, setCompressionMode to disable feature.
protected Dimension[]preferredTileSizes
Preferred tile size range pairs.
protected intprogressiveMode
The mode controlling progressive encoding, which must be set to one of the four MODE_* values, except MODE_EXPLICIT.
protected inttileGridXOffset
The amount by which the tile grid origin should be offset horizontally from the image origin if tiling has been set.
protected inttileGridYOffset
The amount by which the tile grid origin should be offset vertically from the image origin if tiling has been set.
protected inttileHeight
The height of each tile if tiling has been set.
protected inttileWidth
The width of each tile if tiling has been set.
protected inttilingMode
The mode controlling tiling settings, which must be set to one of the four MODE_* values.
protected booleantilingSet
True if the tiling parameters have been specified.
Constructor Summary
protected ImageWriteParam()
Creates an empty ImageWriteParam object.
ImageWriteParam(Locale locale)
Creates an ImageWriteParam object with the given locale.
Method Summary
booleancanOffsetTiles()
booleancanWriteCompressed()
booleancanWriteProgressive()
booleancanWriteTiles()
floatgetBitRate(float quality)
intgetCompressionMode()
floatgetCompressionQuality()
String[]getCompressionQualityDescriptions()
float[]getCompressionQualityValues()
StringgetCompressionType()
String[]getCompressionTypes()
LocalegetLocale()
StringgetLocalizedCompressionTypeName()
Dimension[]getPreferredTileSizes()
intgetProgressiveMode()
intgetTileGridXOffset()
intgetTileGridYOffset()
intgetTileHeight()
intgetTileWidth()
intgetTilingMode()
booleanisCompressionLossless()
voidsetCompressionMode(int mode)
voidsetCompressionQuality(float quality)
voidsetCompressionType(String compressionType)
voidsetProgressiveMode(int mode)
voidsetTiling(int tileWidth, int tileHeight, int tileGridXOffset, int tileGridYOffset)
voidsetTilingMode(int mode)
voidunsetCompression()
voidunsetTiling()

Field Detail

canOffsetTiles

protected boolean canOffsetTiles
True if tiling grid offset parameters can be set.

canWriteCompressed

protected boolean canWriteCompressed
True if this writer can write images using compression.

canWriteProgressive

protected boolean canWriteProgressive
True if images can be written as a progressive sequence of increasing quality.

canWriteTiles

protected boolean canWriteTiles
True if tile width and height parameters can be set.

compressionMode

protected int compressionMode
Controls compression settings, which must be set to one of the four MODE_* values.

compressionQuality

protected float compressionQuality
Contains the current compression quality setting.

compressionType

protected String compressionType
Contains the name of the current compression type.

compressionTypes

protected String[] compressionTypes
Array of the names of the available compression types.

locale

protected Locale locale
Localizes compression type names and quality descriptions, or null to use default Locale.

MODE_COPY_FROM_METADATA

public static final int MODE_COPY_FROM_METADATA
Can be passed to setTilingMode, setProgressiveMode and setCompressionMode to enable feature.

MODE_DEFAULT

public static final int MODE_DEFAULT
Can be passed to setTilingMode, setProgressiveMode and setCompressionMode to enable feature.

MODE_DISABLED

public static final int MODE_DISABLED
Can be passed to setTilingMode, setProgressiveMode and setCompressionMode to disable feature.

MODE_EXPLICIT

public static final int MODE_EXPLICIT
Can be passed to setTilingMode, setCompressionMode to disable feature.

preferredTileSizes

protected Dimension[] preferredTileSizes
Preferred tile size range pairs.

progressiveMode

protected int progressiveMode
The mode controlling progressive encoding, which must be set to one of the four MODE_* values, except MODE_EXPLICIT.

tileGridXOffset

protected int tileGridXOffset
The amount by which the tile grid origin should be offset horizontally from the image origin if tiling has been set.

tileGridYOffset

protected int tileGridYOffset
The amount by which the tile grid origin should be offset vertically from the image origin if tiling has been set.

tileHeight

protected int tileHeight
The height of each tile if tiling has been set.

tileWidth

protected int tileWidth
The width of each tile if tiling has been set.

tilingMode

protected int tilingMode
The mode controlling tiling settings, which must be set to one of the four MODE_* values.

tilingSet

protected boolean tilingSet
True if the tiling parameters have been specified.

Constructor Detail

ImageWriteParam

protected ImageWriteParam()
Creates an empty ImageWriteParam object. The subclass is responsible to initialize all fields.

ImageWriteParam

public ImageWriteParam(Locale locale)
Creates an ImageWriteParam object with the given locale.

Parameters: locale the locale to use for user visible strings

Method Detail

canOffsetTiles

public boolean canOffsetTiles()

canWriteCompressed

public boolean canWriteCompressed()

canWriteProgressive

public boolean canWriteProgressive()

canWriteTiles

public boolean canWriteTiles()

getBitRate

public float getBitRate(float quality)

getCompressionMode

public int getCompressionMode()

getCompressionQuality

public float getCompressionQuality()

getCompressionQualityDescriptions

public String[] getCompressionQualityDescriptions()

getCompressionQualityValues

public float[] getCompressionQualityValues()

getCompressionType

public String getCompressionType()

getCompressionTypes

public String[] getCompressionTypes()

getLocale

public Locale getLocale()

getLocalizedCompressionTypeName

public String getLocalizedCompressionTypeName()

getPreferredTileSizes

public Dimension[] getPreferredTileSizes()

getProgressiveMode

public int getProgressiveMode()

getTileGridXOffset

public int getTileGridXOffset()

getTileGridYOffset

public int getTileGridYOffset()

getTileHeight

public int getTileHeight()

getTileWidth

public int getTileWidth()

getTilingMode

public int getTilingMode()

isCompressionLossless

public boolean isCompressionLossless()

setCompressionMode

public void setCompressionMode(int mode)

setCompressionQuality

public void setCompressionQuality(float quality)

setCompressionType

public void setCompressionType(String compressionType)

setProgressiveMode

public void setProgressiveMode(int mode)

setTiling

public void setTiling(int tileWidth, int tileHeight, int tileGridXOffset, int tileGridYOffset)

setTilingMode

public void setTilingMode(int mode)

unsetCompression

public void unsetCompression()

unsetTiling

public void unsetTiling()