Class WinBMPFileFormat


public final class WinBMPFileFormat extends FileFormat.StaticImageFileFormat
  • Field Details

  • Constructor Details

    • WinBMPFileFormat

      public WinBMPFileFormat()
  • Method Details

    • compress

      int compress(int comp, byte[] src, int srcOffset, int numBytes, byte[] dest, boolean last)
      Compress numBytes bytes of image data from src, storing in dest (starting at 0), using the technique specified by comp. If last is true, this indicates the last line of the image. Answer the size of the compressed data.
    • compressRLE4Data

      int compressRLE4Data(byte[] src, int srcOffset, int numBytes, byte[] dest, boolean last)
    • compressRLE8Data

      int compressRLE8Data(byte[] src, int srcOffset, int numBytes, byte[] dest, boolean last)
    • convertPixelsToBGR

      void convertPixelsToBGR(ImageData image, byte[] dest)
    • decompressData

      void decompressData(byte[] src, byte[] dest, int stride, int cmp)
    • decompressRLE4Data

      int decompressRLE4Data(byte[] src, int numBytes, int stride, byte[] dest, int destSize)
    • decompressRLE8Data

      int decompressRLE8Data(byte[] src, int numBytes, int stride, byte[] dest, int destSize)
    • 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
    • isPaletteBMP

      boolean isPaletteBMP(PaletteData pal, int depth)
    • 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, byte[] data, OutputStream out, int comp)
      Unload the given image's data into the given byte stream using the given compression strategy. Answer the number of bytes written. Method modified to use the passed data if it is not null.
    • unloadDataNoCompression

      int unloadDataNoCompression(ImageData image, byte[] data, OutputStream out)
      Prepare the given image's data for unloading into a byte stream using no compression strategy. Answer the number of bytes written. Method modified to use the passed data if it is not null.
    • 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)