Saving BMP files with JIMI

Hi,

I need to work with BMP files, which Java cannot handle, so I downloaded a package from Sun’s site called JIMI. I hope someone else has also worked with this. It enables you work with many file formats, including 8 bit and 24 bit BMP.

The I/O is simple, cause when I read in I just have to write Image img = Jimi.getImage(file);
Theoretically, I could also write a file with Jimi.putImage(file); and this does work. However, it always saves the bitmaps in 24 bpp, and not 8.
I tried converting it to 8 bpp using the BMP8Encoder class which comes with JIMI, but in the end I cannot connect all the parts necessary to make it work. Apparently another solution would be to use a JimiWriter, and then JimiWriter wr.setOptions( write something here ), but I don’t know what I need to write to make the resulting image 8-bit bmp.

Anyone knows the answer?

This is JIMI’s web page: http://java.sun.com/products/jimi/

If you can bear to use java 5, that has built-in support for BMP’s anyway, doesn’t it?

Yeah but I want to use java 1.4.2 which doesn’t :wink:

I downloaded JAI, perhaps its more advanced than JIMI…