Class OS2BMPFileFormat


public final class OS2BMPFileFormat extends FileFormat.StaticImageFileFormat
  • Field Details

    • BMPFileHeaderSize

      static final int BMPFileHeaderSize
      See Also:
    • BMPHeaderFixedSize

      static final int BMPHeaderFixedSize
      See Also:
    • width

      int width
    • height

      int height
    • bitCount

      int bitCount
  • Constructor Details

    • OS2BMPFileFormat

      public OS2BMPFileFormat()
  • Method Details

    • isFileFormat

      boolean isFileFormat(LEDataInputStream stream) throws IOException
      Description copied from class: FileFormat
      Return whether or not the specified input stream represents a supported file format.
      Specified by:
      isFileFormat in class FileFormat
      Throws:
      IOException
    • loadData

      byte[] loadData(byte[] infoHeader)
    • loadData

      byte[] loadData(byte[] infoHeader, int stride)
    • loadFileHeader

      int[] loadFileHeader()
    • loadFromByteStream

      ImageData[] loadFromByteStream()
      Specified by:
      loadFromByteStream in class FileFormat.StaticImageFileFormat
    • loadPalette

      PaletteData loadPalette(byte[] infoHeader)
    • paletteFromBytes

      PaletteData paletteFromBytes(byte[] bytes, int numColors)
    • paletteToBytes

      static byte[] paletteToBytes(PaletteData pal)
      Answer a byte array containing the BMP representation of the given device independent palette.
    • unloadData

      int unloadData(ImageData image, OutputStream out)
      Unload the given image's data into the given byte stream. Answer the number of bytes written.
    • unloadIntoByteStream

      void unloadIntoByteStream(ImageLoader loader)
      Unload a DeviceIndependentImage using Windows .BMP format into the given byte stream.
      Specified by:
      unloadIntoByteStream in class FileFormat
    • flipScanLines

      void flipScanLines(byte[] data, int stride, int height)