Writing PBM files with J2SE 5.0
I'm new to all this stuff & I'm having trouble with the difference between JAI & Image I/O.
I'm trying to write a PBM file (a black and white version of a PNM file) using J2SE 1.5.
I've not been able to install the image I/O tools because when I run the installer it says "Needs JDK1.4 or higher".
I've got JAI installed.
I thought the following would work, but the encoder returned is null:
OutputStream out = new FileOutputStream(new File(fullFileName));
// Create the ParameterBlock.
PNMEncodeParam param = new PNMEncodeParam();
// Create the PNM image encoder.
ImageEncoder encoder = ImageCodec.createImageEncoder("PBM", out,
// encoder == null!
if I do ImageCodec.createImageEncoder("PNM"...) it works OK, but I get a full colour file, not a B/W.