javax.imageio.plugins.bmp
Class BMPImageWriteParam

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.imageio.IIOParam sample code for javax.imageio.IIOParam definition code for javax.imageio.IIOParam 
      extended by javax.imageio.ImageWriteParam sample code for javax.imageio.ImageWriteParam definition code for javax.imageio.ImageWriteParam 
          extended by javax.imageio.plugins.bmp.BMPImageWriteParam

public class BMPImageWriteParam
extends ImageWriteParam sample code for javax.imageio.ImageWriteParam definition code for javax.imageio.ImageWriteParam

A subclass of ImageWriteParam for encoding images in the BMP format.

This class allows for the specification of various parameters while writing a BMP format image file. By default, the data layout is bottom-up, such that the pixels are stored in bottom-up order, the first scanline being stored last.

The particular compression scheme to be used can be specified by using the setCompressionType() method with the appropriate type string. The compression scheme specified will be honored if and only if it is compatible with the type of image being written. If the specified compression scheme is not compatible with the type of image being written then the IOException will be thrown by the BMP image writer. If the compression type is not set explicitly then getCompressionType() will return null. In this case the BMP image writer will select a compression type that supports encoding of the given image without loss of the color resolution.

The compression type strings and the image type(s) each supports are listed in the following table:

Compression Types
Type String Description Image Types
BI_RGB Uncompressed RLE <= 8-bits/sample
BI_RLE8 8-bit Run Length Encoding <= 8-bits/sample
BI_RLE4 4-bit Run Length Encoding <= 4-bits/sample
BI_BITFIELDS Packed data 16 or 32 bits/sample


Field Summary
 
Fields inherited from class javax.imageio.ImageWriteParam sample code for javax.imageio.ImageWriteParam definition code for javax.imageio.ImageWriteParam
canOffsetTiles sample code for javax.imageio.ImageWriteParam.canOffsetTiles definition code for javax.imageio.ImageWriteParam.canOffsetTiles , canWriteCompressed sample code for javax.imageio.ImageWriteParam.canWriteCompressed definition code for javax.imageio.ImageWriteParam.canWriteCompressed , canWriteProgressive sample code for javax.imageio.ImageWriteParam.canWriteProgressive definition code for javax.imageio.ImageWriteParam.canWriteProgressive , canWriteTiles sample code for javax.imageio.ImageWriteParam.canWriteTiles definition code for javax.imageio.ImageWriteParam.canWriteTiles , compressionMode sample code for javax.imageio.ImageWriteParam.compressionMode definition code for javax.imageio.ImageWriteParam.compressionMode , compressionQuality sample code for javax.imageio.ImageWriteParam.compressionQuality definition code for javax.imageio.ImageWriteParam.compressionQuality , compressionType sample code for javax.imageio.ImageWriteParam.compressionType definition code for javax.imageio.ImageWriteParam.compressionType , compressionTypes sample code for javax.imageio.ImageWriteParam.compressionTypes definition code for javax.imageio.ImageWriteParam.compressionTypes , locale sample code for javax.imageio.ImageWriteParam.locale definition code for javax.imageio.ImageWriteParam.locale , MODE_COPY_FROM_METADATA sample code for javax.imageio.ImageWriteParam.MODE_COPY_FROM_METADATA definition code for javax.imageio.ImageWriteParam.MODE_COPY_FROM_METADATA , MODE_DEFAULT sample code for javax.imageio.ImageWriteParam.MODE_DEFAULT definition code for javax.imageio.ImageWriteParam.MODE_DEFAULT , MODE_DISABLED sample code for javax.imageio.ImageWriteParam.MODE_DISABLED definition code for javax.imageio.ImageWriteParam.MODE_DISABLED , MODE_EXPLICIT sample code for javax.imageio.ImageWriteParam.MODE_EXPLICIT definition code for javax.imageio.ImageWriteParam.MODE_EXPLICIT , preferredTileSizes sample code for javax.imageio.ImageWriteParam.preferredTileSizes definition code for javax.imageio.ImageWriteParam.preferredTileSizes , progressiveMode sample code for javax.imageio.ImageWriteParam.progressiveMode definition code for javax.imageio.ImageWriteParam.progressiveMode , tileGridXOffset sample code for javax.imageio.ImageWriteParam.tileGridXOffset definition code for javax.imageio.ImageWriteParam.tileGridXOffset , tileGridYOffset sample code for javax.imageio.ImageWriteParam.tileGridYOffset definition code for javax.imageio.ImageWriteParam.tileGridYOffset , tileHeight sample code for javax.imageio.ImageWriteParam.tileHeight definition code for javax.imageio.ImageWriteParam.tileHeight , tileWidth sample code for javax.imageio.ImageWriteParam.tileWidth definition code for javax.imageio.ImageWriteParam.tileWidth , tilingMode sample code for javax.imageio.ImageWriteParam.tilingMode definition code for javax.imageio.ImageWriteParam.tilingMode , tilingSet sample code for javax.imageio.ImageWriteParam.tilingSet definition code for javax.imageio.ImageWriteParam.tilingSet
 
Fields inherited from class javax.imageio.IIOParam sample code for javax.imageio.IIOParam definition code for javax.imageio.IIOParam
controller sample code for javax.imageio.IIOParam.controller definition code for javax.imageio.IIOParam.controller , defaultController sample code for javax.imageio.IIOParam.defaultController definition code for javax.imageio.IIOParam.defaultController , destinationOffset sample code for javax.imageio.IIOParam.destinationOffset definition code for javax.imageio.IIOParam.destinationOffset , destinationType sample code for javax.imageio.IIOParam.destinationType definition code for javax.imageio.IIOParam.destinationType , sourceBands sample code for javax.imageio.IIOParam.sourceBands definition code for javax.imageio.IIOParam.sourceBands , sourceRegion sample code for javax.imageio.IIOParam.sourceRegion definition code for javax.imageio.IIOParam.sourceRegion , sourceXSubsampling sample code for javax.imageio.IIOParam.sourceXSubsampling definition code for javax.imageio.IIOParam.sourceXSubsampling , sourceYSubsampling sample code for javax.imageio.IIOParam.sourceYSubsampling definition code for javax.imageio.IIOParam.sourceYSubsampling , subsamplingXOffset sample code for javax.imageio.IIOParam.subsamplingXOffset definition code for javax.imageio.IIOParam.subsamplingXOffset , subsamplingYOffset sample code for javax.imageio.IIOParam.subsamplingYOffset definition code for javax.imageio.IIOParam.subsamplingYOffset
 
Constructor Summary
BMPImageWriteParam sample code for javax.imageio.plugins.bmp.BMPImageWriteParam.BMPImageWriteParam() definition code for javax.imageio.plugins.bmp.BMPImageWriteParam.BMPImageWriteParam() ()
          Constructs an BMPImageWriteParam object with default values for all parameters and a null Locale.
BMPImageWriteParam sample code for javax.imageio.plugins.bmp.BMPImageWriteParam.BMPImageWriteParam(java.util.Locale) definition code for javax.imageio.plugins.bmp.BMPImageWriteParam.BMPImageWriteParam(java.util.Locale) (Locale sample code for java.util.Locale definition code for java.util.Locale  locale)
          Constructs a BMPImageWriteParam set to use a given Locale and with default values for all parameters.
 
Method Summary
 boolean isTopDown sample code for javax.imageio.plugins.bmp.BMPImageWriteParam.isTopDown() definition code for javax.imageio.plugins.bmp.BMPImageWriteParam.isTopDown() ()
          Returns the value of the topDown parameter.
 void setTopDown sample code for javax.imageio.plugins.bmp.BMPImageWriteParam.setTopDown(boolean) definition code for javax.imageio.plugins.bmp.BMPImageWriteParam.setTopDown(boolean) (boolean topDown)
          If set, the data will be written out in a top-down manner, the first scanline being written first.
 
Methods inherited from class javax.imageio.ImageWriteParam sample code for javax.imageio.ImageWriteParam definition code for javax.imageio.ImageWriteParam
canOffsetTiles sample code for javax.imageio.ImageWriteParam.canOffsetTiles() definition code for javax.imageio.ImageWriteParam.canOffsetTiles() , canWriteCompressed sample code for javax.imageio.ImageWriteParam.canWriteCompressed() definition code for javax.imageio.ImageWriteParam.canWriteCompressed() , canWriteProgressive sample code for javax.imageio.ImageWriteParam.canWriteProgressive() definition code for javax.imageio.ImageWriteParam.canWriteProgressive() , canWriteTiles sample code for javax.imageio.ImageWriteParam.canWriteTiles() definition code for javax.imageio.ImageWriteParam.canWriteTiles() , getBitRate sample code for javax.imageio.ImageWriteParam.getBitRate(float) definition code for javax.imageio.ImageWriteParam.getBitRate(float) , getCompressionMode sample code for javax.imageio.ImageWriteParam.getCompressionMode() definition code for javax.imageio.ImageWriteParam.getCompressionMode() , getCompressionQuality sample code for javax.imageio.ImageWriteParam.getCompressionQuality() definition code for javax.imageio.ImageWriteParam.getCompressionQuality() , getCompressionQualityDescriptions sample code for javax.imageio.ImageWriteParam.getCompressionQualityDescriptions() definition code for javax.imageio.ImageWriteParam.getCompressionQualityDescriptions() , getCompressionQualityValues sample code for javax.imageio.ImageWriteParam.getCompressionQualityValues() definition code for javax.imageio.ImageWriteParam.getCompressionQualityValues() , getCompressionType sample code for javax.imageio.ImageWriteParam.getCompressionType() definition code for javax.imageio.ImageWriteParam.getCompressionType() , getCompressionTypes sample code for javax.imageio.ImageWriteParam.getCompressionTypes() definition code for javax.imageio.ImageWriteParam.getCompressionTypes() , getLocale sample code for javax.imageio.ImageWriteParam.getLocale() definition code for javax.imageio.ImageWriteParam.getLocale() , getLocalizedCompressionTypeName sample code for javax.imageio.ImageWriteParam.getLocalizedCompressionTypeName() definition code for javax.imageio.ImageWriteParam.getLocalizedCompressionTypeName() , getPreferredTileSizes sample code for javax.imageio.ImageWriteParam.getPreferredTileSizes() definition code for javax.imageio.ImageWriteParam.getPreferredTileSizes() , getProgressiveMode sample code for javax.imageio.ImageWriteParam.getProgressiveMode() definition code for javax.imageio.ImageWriteParam.getProgressiveMode() , getTileGridXOffset sample code for javax.imageio.ImageWriteParam.getTileGridXOffset() definition code for javax.imageio.ImageWriteParam.getTileGridXOffset() , getTileGridYOffset sample code for javax.imageio.ImageWriteParam.getTileGridYOffset() definition code for javax.imageio.ImageWriteParam.getTileGridYOffset() , getTileHeight sample code for javax.imageio.ImageWriteParam.getTileHeight() definition code for javax.imageio.ImageWriteParam.getTileHeight() , getTileWidth sample code for javax.imageio.ImageWriteParam.getTileWidth() definition code for javax.imageio.ImageWriteParam.getTileWidth() , getTilingMode sample code for javax.imageio.ImageWriteParam.getTilingMode() definition code for javax.imageio.ImageWriteParam.getTilingMode() , isCompressionLossless sample code for javax.imageio.ImageWriteParam.isCompressionLossless() definition code for javax.imageio.ImageWriteParam.isCompressionLossless() , setCompressionMode sample code for javax.imageio.ImageWriteParam.setCompressionMode(int) definition code for javax.imageio.ImageWriteParam.setCompressionMode(int) , setCompressionQuality sample code for javax.imageio.ImageWriteParam.setCompressionQuality(float) definition code for javax.imageio.ImageWriteParam.setCompressionQuality(float) , setCompressionType sample code for javax.imageio.ImageWriteParam.setCompressionType(java.lang.String) definition code for javax.imageio.ImageWriteParam.setCompressionType(java.lang.String) , setProgressiveMode sample code for javax.imageio.ImageWriteParam.setProgressiveMode(int) definition code for javax.imageio.ImageWriteParam.setProgressiveMode(int) , setTiling sample code for javax.imageio.ImageWriteParam.setTiling(int, int, int, int) definition code for javax.imageio.ImageWriteParam.setTiling(int, int, int, int) , setTilingMode sample code for javax.imageio.ImageWriteParam.setTilingMode(int) definition code for javax.imageio.ImageWriteParam.setTilingMode(int) , unsetCompression sample code for javax.imageio.ImageWriteParam.unsetCompression() definition code for javax.imageio.ImageWriteParam.unsetCompression() , unsetTiling sample code for javax.imageio.ImageWriteParam.unsetTiling() definition code for javax.imageio.ImageWriteParam.unsetTiling()
 
Methods inherited from class javax.imageio.IIOParam sample code for javax.imageio.IIOParam definition code for javax.imageio.IIOParam
activateController sample code for javax.imageio.IIOParam.activateController() definition code for javax.imageio.IIOParam.activateController() , getController sample code for javax.imageio.IIOParam.getController() definition code for javax.imageio.IIOParam.getController() , getDefaultController sample code for javax.imageio.IIOParam.getDefaultController() definition code for javax.imageio.IIOParam.getDefaultController() , getDestinationOffset sample code for javax.imageio.IIOParam.getDestinationOffset() definition code for javax.imageio.IIOParam.getDestinationOffset() , getDestinationType sample code for javax.imageio.IIOParam.getDestinationType() definition code for javax.imageio.IIOParam.getDestinationType() , getSourceBands sample code for javax.imageio.IIOParam.getSourceBands() definition code for javax.imageio.IIOParam.getSourceBands() , getSourceRegion sample code for javax.imageio.IIOParam.getSourceRegion() definition code for javax.imageio.IIOParam.getSourceRegion() , getSourceXSubsampling sample code for javax.imageio.IIOParam.getSourceXSubsampling() definition code for javax.imageio.IIOParam.getSourceXSubsampling() , getSourceYSubsampling sample code for javax.imageio.IIOParam.getSourceYSubsampling() definition code for javax.imageio.IIOParam.getSourceYSubsampling() , getSubsamplingXOffset sample code for javax.imageio.IIOParam.getSubsamplingXOffset() definition code for javax.imageio.IIOParam.getSubsamplingXOffset() , getSubsamplingYOffset sample code for javax.imageio.IIOParam.getSubsamplingYOffset() definition code for javax.imageio.IIOParam.getSubsamplingYOffset() , hasController sample code for javax.imageio.IIOParam.hasController() definition code for javax.imageio.IIOParam.hasController() , setController sample code for javax.imageio.IIOParam.setController(javax.imageio.IIOParamController) definition code for javax.imageio.IIOParam.setController(javax.imageio.IIOParamController) , setDestinationOffset sample code for javax.imageio.IIOParam.setDestinationOffset(java.awt.Point) definition code for javax.imageio.IIOParam.setDestinationOffset(java.awt.Point) , setDestinationType sample code for javax.imageio.IIOParam.setDestinationType(javax.imageio.ImageTypeSpecifier) definition code for javax.imageio.IIOParam.setDestinationType(javax.imageio.ImageTypeSpecifier) , setSourceBands sample code for javax.imageio.IIOParam.setSourceBands(int[]) definition code for javax.imageio.IIOParam.setSourceBands(int[]) , setSourceRegion sample code for javax.imageio.IIOParam.setSourceRegion(java.awt.Rectangle) definition code for javax.imageio.IIOParam.setSourceRegion(java.awt.Rectangle) , setSourceSubsampling sample code for javax.imageio.IIOParam.setSourceSubsampling(int, int, int, int) definition code for javax.imageio.IIOParam.setSourceSubsampling(int, int, int, int)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

BMPImageWriteParam sample code for javax.imageio.plugins.bmp.BMPImageWriteParam(java.util.Locale) definition code for javax.imageio.plugins.bmp.BMPImageWriteParam(java.util.Locale)

public BMPImageWriteParam(Locale sample code for java.util.Locale definition code for java.util.Locale  locale)
Constructs a BMPImageWriteParam set to use a given Locale and with default values for all parameters.

Parameters:
locale - a Locale to be used to localize compression type names and quality descriptions, or null.

BMPImageWriteParam sample code for javax.imageio.plugins.bmp.BMPImageWriteParam() definition code for javax.imageio.plugins.bmp.BMPImageWriteParam()

public BMPImageWriteParam()
Constructs an BMPImageWriteParam object with default values for all parameters and a null Locale.

Method Detail

setTopDown sample code for javax.imageio.plugins.bmp.BMPImageWriteParam.setTopDown(boolean) definition code for javax.imageio.plugins.bmp.BMPImageWriteParam.setTopDown(boolean)

public void setTopDown(boolean topDown)
If set, the data will be written out in a top-down manner, the first scanline being written first.

Parameters:
topDown - whether the data are written in top-down order.

isTopDown sample code for javax.imageio.plugins.bmp.BMPImageWriteParam.isTopDown() definition code for javax.imageio.plugins.bmp.BMPImageWriteParam.isTopDown()

public boolean isTopDown()
Returns the value of the topDown parameter. The default is false.

Returns:
whether the data are written in top-down order.