javax.imageio

Class ImageWriteParam

Known Direct Subclasses:
BMPImageWriteParam, JPEGImageWriteParam

public class ImageWriteParam
extends IIOParam

DOCUMENT ME

Field Summary

static int
MODE_COPY_FROM_METADATA
Can be passed to setTilingMode, setProgressiveMode and setCompressionMode to enable feature.
static int
MODE_DEFAULT
Can be passed to setTilingMode, setProgressiveMode and setCompressionMode to enable feature.
static int
MODE_DISABLED
Can be passed to setTilingMode, setProgressiveMode and setCompressionMode to disable feature.
static int
MODE_EXPLICIT
Can be passed to setTilingMode, setCompressionMode to disable feature.
protected boolean
canOffsetTiles
True if tiling grid offset parameters can be set.
protected boolean
canWriteCompressed
True if this writer can write images using compression.
protected boolean
canWriteProgressive
True if images can be written as a progressive sequence of increasing quality.
protected boolean
canWriteTiles
True if tile width and height parameters can be set.
protected int
compressionMode
Controls compression settings, which must be set to one of the four MODE_* values.
protected float
compressionQuality
Contains the current compression quality setting.
protected String
compressionType
Contains the name of the current compression type.
protected String[]
compressionTypes
Array of the names of the available compression types.
protected Locale
locale
Localizes compression type names and quality descriptions, or null to use default Locale.
protected Dimension[]
preferredTileSizes
Preferred tile size range pairs.
protected int
progressiveMode
The mode controlling progressive encoding, which must be set to one of the four MODE_* values, except MODE_EXPLICIT.
protected int
tileGridXOffset
The amount by which the tile grid origin should be offset horizontally from the image origin if tiling has been set.
protected int
tileGridYOffset
The amount by which the tile grid origin should be offset vertically from the image origin if tiling has been set.
protected int
tileHeight
The height of each tile if tiling has been set.
protected int
tileWidth
The width of each tile if tiling has been set.
protected int
tilingMode
The mode controlling tiling settings, which must be set to one of the four MODE_* values.
protected boolean
tilingSet
True if the tiling parameters have been specified.

Fields inherited from class javax.imageio.IIOParam

controller, defaultController, destinationOffset, destinationType, sourceBands, sourceRegion, sourceXSubsampling, sourceYSubsampling, subsamplingXOffset, subsamplingYOffset

Constructor Summary

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

Method Summary

boolean
canOffsetTiles()
boolean
canWriteCompressed()
boolean
canWriteProgressive()
boolean
canWriteTiles()
float
getBitRate(float quality)
int
getCompressionMode()
float
getCompressionQuality()
String[]
getCompressionQualityDescriptions()
float[]
getCompressionQualityValues()
String
getCompressionType()
String[]
getCompressionTypes()
Locale
getLocale()
String
getLocalizedCompressionTypeName()
Dimension[]
getPreferredTileSizes()
int
getProgressiveMode()
int
getTileGridXOffset()
int
getTileGridYOffset()
int
getTileHeight()
int
getTileWidth()
int
getTilingMode()
boolean
isCompressionLossless()
void
setCompressionMode(int mode)
void
setCompressionQuality(float quality)
void
setCompressionType(String compressionType)
void
setProgressiveMode(int mode)
void
setTiling(int tileWidth, int tileHeight, int tileGridXOffset, int tileGridYOffset)
void
setTilingMode(int mode)
void
unsetCompression()
void
unsetTiling()

Methods inherited from class javax.imageio.IIOParam

activateController, getController, getDefaultController, getDestinationOffset, getDestinationType, getSourceBands, getSourceRegion, getSourceXSubsampling, getSourceYSubsampling, getSubsamplingXOffset, getSubsamplingYOffset, hasController, setController, setDestinationOffset, setDestinationType, setSourceBands, setSourceRegion, setSourceSubsampling

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

MODE_COPY_FROM_METADATA

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

MODE_DEFAULT

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

MODE_DISABLED

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

MODE_EXPLICIT

public static final int MODE_EXPLICIT
Can be passed to setTilingMode, setCompressionMode to disable feature.
Field Value:
2

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.

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 Details

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 Details

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()

ImageWriteParam.java -- Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.