Project Nayuki

BMP I/O library (Java)


BMP I/O is a lightweight Java library for reading and writing BMP image files.

Supported reading formats and features:

  • Paletted 1-bit
  • Paletted 4-bit
  • Paletted 4-bit with RLE compression
  • Paletted 8-bit
  • Paletted 8-bit with RLE compression
  • RGB 8,8,8
  • RGBA 8,8,8,8
  • Rows in bottom-to-top order (common)
  • Rows in top-to-bottom order (uncommon)

Supported writing formats:

  • RGB 8,8,8
  • Rows in bottom-to-top order

Unsupported read features: BITMAPCOREHEADER/BITMAPCOREHEADER2/BITMAPV4HEADER/BITMAPV5HEADER header, bit fields pixel data, gamma, color space, ICC color profile.

Source code

Browse the project’s source code at GitHub:

Or download a ZIP of all the files:

The code is open source under the MIT License. See the readme file for details.

More info