BMP libraries for Java
- ImageIO (
javax.imageio) in the JDK reads and writes BMP with one line of code. It writes uncompressed, RLE4, RLE8 and bit field BMPs, but can’t write images with an alpha channel. - TwelveMonkeys is a set of ImageIO plugins. Its BMP plugin reads every known BMP variant (OS/2, V4/V5, embedded PNG and JPEG) and also ICO and CUR files. Add the jar and
ImageIO.readuses it automatically.
On Android use BitmapFactory.decodeFile, which reads BMP; Android has no built-in BMP encoder.
- ImageIO Java ImageIO (javax.imageio) reads and writes BMP files with no extra dependencies. How to load and save BMP, avoid the alpha channel error.
- TwelveMonkeys TwelveMonkeys ImageIO adds a BMP, ICO and CUR plugin to Java's ImageIO. How to install it, read any BMP variant, write 32-bit BMP with alpha.