Class BMPImageReader

java.lang.Object
javax.imageio.ImageReader
com.github.jaiimageio.impl.plugins.bmp.BMPImageReader
All Implemented Interfaces:
BMPConstants

public class BMPImageReader extends ImageReader implements BMPConstants
This class is the Java Image IO plugin reader for BMP images. It may subsample the image, clip the image, select sub-bands, and shift the decoded image origin if the proper decoding parameter are set in the provided ImageReadParam. This class supports Microsoft Windows Bitmap Version 3-5, as well as OS/2 Bitmap Version 2.x (for single-image BMP file).
  • Field Details

    • VERSION_2_1_BIT

      private static final int VERSION_2_1_BIT
      See Also:
    • VERSION_2_4_BIT

      private static final int VERSION_2_4_BIT
      See Also:
    • VERSION_2_8_BIT

      private static final int VERSION_2_8_BIT
      See Also:
    • VERSION_2_24_BIT

      private static final int VERSION_2_24_BIT
      See Also:
    • VERSION_3_1_BIT

      private static final int VERSION_3_1_BIT
      See Also:
    • VERSION_3_4_BIT

      private static final int VERSION_3_4_BIT
      See Also:
    • VERSION_3_8_BIT

      private static final int VERSION_3_8_BIT
      See Also:
    • VERSION_3_24_BIT

      private static final int VERSION_3_24_BIT
      See Also:
    • VERSION_3_NT_16_BIT

      private static final int VERSION_3_NT_16_BIT
      See Also:
    • VERSION_3_NT_32_BIT

      private static final int VERSION_3_NT_32_BIT
      See Also:
    • VERSION_4_1_BIT

      private static final int VERSION_4_1_BIT
      See Also:
    • VERSION_4_4_BIT

      private static final int VERSION_4_4_BIT
      See Also:
    • VERSION_4_8_BIT

      private static final int VERSION_4_8_BIT
      See Also:
    • VERSION_4_16_BIT

      private static final int VERSION_4_16_BIT
      See Also:
    • VERSION_4_24_BIT

      private static final int VERSION_4_24_BIT
      See Also:
    • VERSION_4_32_BIT

      private static final int VERSION_4_32_BIT
      See Also:
    • VERSION_3_XP_EMBEDDED

      private static final int VERSION_3_XP_EMBEDDED
      See Also:
    • VERSION_4_XP_EMBEDDED

      private static final int VERSION_4_XP_EMBEDDED
      See Also:
    • VERSION_5_XP_EMBEDDED

      private static final int VERSION_5_XP_EMBEDDED
      See Also:
    • bitmapFileSize

      private long bitmapFileSize
    • bitmapOffset

      private long bitmapOffset
    • compression

      private long compression
    • imageSize

      private long imageSize
    • palette

      private byte[] palette
    • imageType

      private int imageType
    • numBands

      private int numBands
    • isBottomUp

      private boolean isBottomUp
    • bitsPerPixel

      private int bitsPerPixel
    • redMask

      private int redMask
    • greenMask

      private int greenMask
    • blueMask

      private int blueMask
    • alphaMask

      private int alphaMask
    • sampleModel

      private SampleModel sampleModel
    • originalSampleModel

      private SampleModel originalSampleModel
    • colorModel

      private ColorModel colorModel
    • originalColorModel

      private ColorModel originalColorModel
    • iis

      private ImageInputStream iis
      The input stream where reads from
    • gotHeader

      private boolean gotHeader
      Indicates whether the header is read.
    • imageDataOffset

      private long imageDataOffset
      The stream position where the image data starts.
    • width

      private int width
      The original image width.
    • height

      private int height
      The original image height.
    • destinationRegion

      private Rectangle destinationRegion
      The destination region.
    • sourceRegion

      private Rectangle sourceRegion
      The source region.
    • metadata

      private BMPMetadata metadata
      The metadata from the stream.
    • bi

      private BufferedImage bi
      The destination image.
    • noTransform

      private boolean noTransform
      Indicates whether subsampled, subregion is required, and offset is defined
    • seleBand

      private boolean seleBand
      Indicates whether subband is selected.
    • scaleX

      private int scaleX
      The scaling factors.
    • scaleY

      private int scaleY
      The scaling factors.
    • sourceBands

      private int[] sourceBands
      source and destination bands.
    • destBands

      private int[] destBands
      source and destination bands.
  • Constructor Details

    • BMPImageReader

      public BMPImageReader(ImageReaderSpi originator)
      Constructs BMPImageReader from the provided ImageReaderSpi.
  • Method Details